[llvm] [SLP][REVEC] Initial commits. (PR #98269)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 11:09:48 PDT 2024


================
@@ -6780,19 +6795,20 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
   }
 
   // Don't handle vectors.
-  if (S.OpValue->getType()->isVectorTy() &&
+  if (!RunSLPReVectorization && S.OpValue->getType()->isVectorTy() &&
       !isa<InsertElementInst>(S.OpValue)) {
     LLVM_DEBUG(dbgs() << "SLP: Gathering due to vector type.\n");
     newTreeEntry(VL, std::nullopt /*not vectorized*/, S, UserTreeIdx);
     return;
   }
 
-  if (StoreInst *SI = dyn_cast<StoreInst>(S.OpValue))
-    if (SI->getValueOperand()->getType()->isVectorTy()) {
-      LLVM_DEBUG(dbgs() << "SLP: Gathering due to store vector type.\n");
-      newTreeEntry(VL, std::nullopt /*not vectorized*/, S, UserTreeIdx);
-      return;
-    }
+  if (!RunSLPReVectorization)
+    if (StoreInst *SI = dyn_cast<StoreInst>(S.OpValue))
+      if (SI->getValueOperand()->getType()->isVectorTy()) {
----------------
alexey-bataev wrote:

```suggestion
  if (StoreInst *SI = dyn_cast<StoreInst>(S.OpValue))
    if (!RunSLPReVectorization && SI->getValueOperand()->getType()->isVectorTy()) {
```


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


More information about the llvm-commits mailing list