[llvm] [SCEV] Preserve flags in SCEVLoopGuardRewriter for add and mul. (PR #91472)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 05:52:54 PDT 2024
fhahn wrote:
> > SCEVLoopGuardRewriter only replaces operands with equivalent values
>
> But aren't the values only equivalent in the scope of the guards, while the generated expressions might potentially have a larger scope?
The patch still uses the flags from the original expression which should be valid for their original scope, so after re-writing with more restricted values they should still be valid for the larger scope (e.g. re-writing `a + nuw b => a +nuw c` with `range(b).contains(range(c))`?
https://github.com/llvm/llvm-project/pull/91472
More information about the llvm-commits
mailing list