[PATCH] D69563: [LV] Strip wrap flags from vectorized reductions

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 07:02:32 PDT 2019


lebedev.ri added a comment.

I remember seeing similar patch for SLPVectorizer(?).
There the consensus was that the flags that are present on all instructions, can be preserved.
This isn't applicable here?



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3706-3709
+    if (StripWrapFlags) {
+      cast<Instruction>(Val)->setHasNoUnsignedWrap(false);
+      cast<Instruction>(Val)->setHasNoSignedWrap(false);
+    }
----------------
```
if(auto* I = dyn_cast<Instruction>(LoopVal))
  I->dropPoisonGeneratingFlags();
```
Shouldn't this be done outside of this loop though?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69563/new/

https://reviews.llvm.org/D69563





More information about the llvm-commits mailing list