[llvm] [VPlan] Support pointer min/max bounds in VPlan memory runtime checks. (PR #225828)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 07:58:33 PDT 2026


================
@@ -7032,12 +7032,8 @@ void LoopVectorizationPlanner::attachRuntimeChecks(
                   "(e.g., adding 'restrict').";
       });
     }
-    // VPSCEVExpander expands AddRecs in the plan's entry, not the check block,
-    // and does not support pointer-typed min/max yet.
-    auto IsUnsupported = [](const SCEV *S) {
-      return isa<SCEVAddRecExpr>(S) ||
-             (isa<SCEVMinMaxExpr>(S) && S->getType()->isPointerTy());
-    };
+    // VPSCEVExpander expands AddRecs in the plan's entry, not the check block.
+    auto IsUnsupported = [](const SCEV *S) { return isa<SCEVAddRecExpr>(S); };
----------------
artagnon wrote:

```suggestion
    auto IsUnsupported = IsaPred<SCEVAddRecExpr>;
```

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


More information about the llvm-commits mailing list