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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 15:22:50 PDT 2022


ABataev added a comment.

In D126939#3557189 <https://reviews.llvm.org/D126939#3557189>, @MaskRay wrote:

> Better to have @ABataev's approval.
>
> Was the issue introduced by D103458 <https://reviews.llvm.org/D103458>?

Looks so



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7565
+    // Don't convert an undef to a poison while padding
+    for (Value *V : drop_begin(VL, VL.size() - (VF - UniqueValues.size()))) {
+      Value *PaddingV = (isa<UndefValue>(V) && !isa<PoisonValue>(V))
----------------
Why just not `UniqueValue.append(std::next(VL.begin(), VF-UniqueValues.size()), 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