[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 10:14:45 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:

Hi Alexey. Can you please put this under an option (let it be true by default)?
Here is the problem: sometime we create LIT tests deliberately short and force to go through via just making slp-threshold very low. We merely need SLP vectorizer to execute specific path even though it could be unprofitable in a test case scenario. But since this new staff does not check cost threshold at all, we observe changing some tests behavior and they no longer serve their purpose. Having the option we could fix that.


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


More information about the llvm-commits mailing list