[llvm] [VPlan] Simplify before covnertToConcreteRecipes, remove SCALAR-STEPS. (PR #123655)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 09:36:35 PST 2025


================
@@ -888,6 +888,14 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
     return;
   }
 
+  if (auto *Steps = dyn_cast<VPScalarIVStepsRecipe>(&R)) {
+    if (Steps->getParent()->getPlan()->isUnrolled() &&
+        Steps->getNumOperands() == 2 && vputils::onlyFirstLaneUsed(Steps)) {
----------------
david-arm wrote:

Isn't `Steps` guaranteed to have two operands? The constructor for VPScalarIVStepsRecipe seems to suggest that.

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


More information about the llvm-commits mailing list