[llvm] [SLP][REVEC] Make Instruction::Select support vector instructions. (PR #100507)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 12:42:42 PDT 2024


================
@@ -13196,6 +13212,21 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
           False = Builder.CreateIntCast(False, VecTy, GetOperandSignedness(2));
       }
 
+      unsigned CondNumElements = getNumElements(Cond->getType());
+      unsigned TrueNumElements = getNumElements(True->getType());
+      assert(TrueNumElements % CondNumElements == 0 &&
+             "Cannot vectorize Instruction::Select");
----------------
alexey-bataev wrote:

It does not prove that TrueNumElements >= CondNumElements

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


More information about the llvm-commits mailing list