14 #include "llvm/ADT/APSInt.h"
16 using namespace circt;
19 return value.getBitWidth() ? value.sext(width) : value.zext(width);
23 return value.getBitWidth()
24 ? value.extOrTrunc(width)
25 : APSInt(value.zextOrTrunc(width), value.isUnsigned());
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
APSInt extOrTruncZeroWidth(APSInt value, unsigned width)
A safe version of APSInt::extOrTrunc that will NOT assert on zero-width signed APSInts.
APInt sextZeroWidth(APInt value, unsigned width)
A safe version of APInt::sext that will NOT assert on zero-width signed APSInts.