[llvm] [SCEV] Add SafeWrap flag to AddRecs (PR #118483)
JĂșlio De Bastiani via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 08:17:26 PST 2024
OtherRandomUser wrote:
> Do I understand correctly that the "safe-wrap" flag does not actually carry any operational semantics, and is just a marker to disable nowrap predication?
That is correct. In the snippet I shared above we are interested in the and operation `int ind = i & 0x7f;`, which is modeled as `(zext i7 {0,+,1}<sw><%for.body> to i32)`. The problem we were running into is that during the creation of the scev checks for vectorization `SCEVPredicateRewriter` was removing the zext expression in favor of a no wrap predicate. This patch was made to solve that problem.
https://github.com/llvm/llvm-project/pull/118483
More information about the llvm-commits
mailing list