[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

Justin Stitt via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 16:27:00 PDT 2024


================
@@ -4249,6 +4270,10 @@ Value *ScalarExprEmitter::EmitFixedPointBinOp(const BinOpInfo &op) {
 Value *ScalarExprEmitter::EmitSub(const BinOpInfo &op) {
   // The LHS is always a pointer if either side is.
   if (!op.LHS->getType()->isPointerTy()) {
+    if ((op.Ty->isSignedIntegerOrEnumerationType() ||
----------------
JustinStitt wrote:

Yep, fixed with [872e5d6](https://github.com/llvm/llvm-project/pull/86618/commits/872e5d6a2791c7de1268ff3d0bc090578f42067c) alongside a fix to EmitMul

https://github.com/llvm/llvm-project/pull/86618


More information about the cfe-commits mailing list