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());
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
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.