[llvm] [BasicAA] Handle wrapping of pointer arithmetic (PR #69116)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 15 10:09:44 PDT 2023
================
@@ -417,7 +417,8 @@ static LinearExpression GetLinearExpression(
Depth + 1, AC, DT);
E.Offset <<= RHS.getLimitedValue();
E.Scale <<= RHS.getLimitedValue();
- E.IsNSW &= NSW;
+ // The nsw flag has different semantics for shift and mul.
+ E.IsNSW = false;
----------------
nikic wrote:
Well, I guess LHS being a constant isn't relevant in this code, so just checking the RHS is enough.
https://github.com/llvm/llvm-project/pull/69116
More information about the llvm-commits
mailing list