[clang] [clang][CodeGen][UBSan] Fixing shift-exponent generation for _BitInt (PR #80515)
Adam Magier via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 5 15:13:22 PST 2024
================
@@ -4121,6 +4121,13 @@ Value *ScalarExprEmitter::GetWidthMinusOneValue(Value* LHS,Value* RHS) {
Ty = cast<llvm::IntegerType>(VT->getElementType());
else
Ty = cast<llvm::IntegerType>(LHS->getType());
+ // Testing with small _BitInt types has shown that Ty->getBitwidth() - 1
----------------
AdamMagierFOSS wrote:
I've renamed the function to be more accurate, but to keep a consistent style with the surrounding code I've not put a formal function description and instead kept the explanatory comment (though rewriting it to not include mentions of _BitInt).
https://github.com/llvm/llvm-project/pull/80515
More information about the cfe-commits
mailing list