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

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 05:58:24 PDT 2024


================
@@ -6779,21 +6794,23 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
     return;
   }
 
-  // Don't handle vectors.
-  if (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");
+  if (!RunSLPReVectorization) {
+    // Don't handle vectors.
+    if (S.OpValue->getType()->isVectorTy() &&
+        !isa<InsertElementInst>(S.OpValue)) {
----------------
alexey-bataev wrote:

```suggestion
  // Don't handle vectors.
  if (!RunSLPReVectorization && S.OpValue->getType()->isVectorTy() &&
      !isa<InsertElementInst>(S.OpValue)) {
```
```suggestion
  if (!RunSLPReVectorization) {
    // Don't handle vectors.
    if (S.OpValue->getType()->isVectorTy() &&
        !isa<InsertElementInst>(S.OpValue)) {
```

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


More information about the llvm-commits mailing list