[llvm] [SLP][REVEC] Make reorderTopToBottom support ShuffleVectorInst. (PR #117310)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 02:57:04 PST 2024


================
@@ -6005,10 +6005,12 @@ void BoUpSLP::reorderTopToBottom() {
       if ((TE->State == TreeEntry::Vectorize ||
            TE->State == TreeEntry::StridedVectorize) &&
           isa<ExtractElementInst, ExtractValueInst, LoadInst, StoreInst,
-              InsertElementInst>(TE->getMainOp())) {
+              InsertElementInst, ShuffleVectorInst>(TE->getMainOp())) {
         assert(!TE->isAltShuffle() &&
                "Alternate instructions are only supported by BinaryOperator "
                "and CastInst.");
+        assert(!isa<ShuffleVectorInst>(TE->getMainOp()) ||
+               SLPReVec && "Only supported by REVEC.");
----------------
alexey-bataev wrote:

It should be not an assertion, but a logic in the if condition

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


More information about the llvm-commits mailing list