[llvm] [BasicAA] Track nuw through decomposed expressions (PR #106512)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 02:39:26 PDT 2024


================
@@ -444,20 +448,22 @@ static LinearExpression GetLinearExpression(
         E = GetLinearExpression(Val.withValue(BOp->getOperand(0), false), DL,
                                 Depth + 1, AC, DT);
         E.Offset += RHS;
+        E.IsNUW &= NUW;
----------------
nikic wrote:

I have trouble actually coming up with a test case that currently gets miscompiled due to the NSW issue ... ideas welcome :)

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


More information about the llvm-commits mailing list