<html><body><p><font size="2">Hi there,</font><br><br><font size="2">I have been trying to obtain a Constant from an APInt using</font><br><font size="2">```</font><br><font size="2">auto maskConstant = llvm::ConstantInt::get(intTy, maskPiece);</font><br><font size="2">```</font><br><font size="2">where `intTy` is a IntergerType pointer (64-bit) and `maskPiece` is an APInt object. However, if `maskPiece` has the a big value say </font><br><font size="2">18374686479671623680, which is 1111111100000000000000000000000000000000000000000000000000000000. The constant will return a negative value -72057594037927936, which looks it is always converted to a signed integer. How can i keep it as unsigned?</font><br><br><font size="2">I have also tried `maskConstant = llvm::ConstantInt::get(intTy, maskPiece.getZExtValue(), false);` or `maskConstant = llvm::ConstantInt::get(intTy, maskPiece.getZExtValue(), false);`, both returned the same negative value. Any help will be appreciated. </font><br><br><font size="2">Best regards,<br><br>Leo Z</font><BR>
</body></html>