[PATCH] D126939: [SLP] Avoid converting undef to poison when gathering.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 4 03:07:25 PDT 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7565
+    // Pad UniqueValues with any existing undef/poison values.
+    UniqueValues.append(
+        std::next(VL.begin(), VL.size() - (VF - UniqueValues.size())),
----------------
Try this to fix the regressions:
```
UniqueValues.append(NumValues-UniqueValues.size(), PoisonValue::get(VL[0]->getType())); 
UniqueValue.append(std::next(VL.begin(), NumValues), VL.end());

```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126939



More information about the llvm-commits mailing list