[llvm] [SLP]Buildvector for alternate instructions with non-profitable gather operands. (PR #84978)

Valery Dmitriev via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 14:31:30 PDT 2024


================
@@ -6074,6 +6194,14 @@ BoUpSLP::TreeEntry::EntryState BoUpSLP::getScalarsVectorizationState(
       LLVM_DEBUG(dbgs() << "SLP: ShuffleVector are not vectorized.\n");
       return TreeEntry::NeedToGather;
     }
+    if (!areAltOperandsProfitable(S, VL)) {
----------------
valerydmit wrote:

Here is the example (in this patch):  gather-move-out-of-loop
The test intent was to check that if we vectorize, we place gather outside of the loop. Note that there is slp-threshold is there exactly for reason to force slp vectorizer to go further.  But after this patch this test no longer serves its purpose. Is that sounds like enough justification now?

https://github.com/llvm/llvm-project/pull/84978


More information about the llvm-commits mailing list