[llvm] [VPlan] Introduce VPlanConstantFolder (PR #125365)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 14:05:19 PDT 2025
================
@@ -1254,19 +1254,18 @@ define i64 @constant_folded_previous_value() {
; UNROLL-NO-VF-NEXT: entry:
; UNROLL-NO-VF-NEXT: br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
; UNROLL-NO-VF: vector.ph:
-; UNROLL-NO-VF-NEXT: [[TMP0:%.*]] = add i64 0, 1
; UNROLL-NO-VF-NEXT: br label [[VECTOR_BODY:%.*]]
; UNROLL-NO-VF: vector.body:
-; UNROLL-NO-VF-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
-; UNROLL-NO-VF-NEXT: [[VECTOR_RECUR:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[TMP0]], [[VECTOR_BODY]] ]
-; UNROLL-NO-VF-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 2
-; UNROLL-NO-VF-NEXT: [[TMP1:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1000
+; UNROLL-NO-VF-NEXT: [[VECTOR_RECUR:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[TMP0:%.*]], [[VECTOR_BODY]] ]
+; UNROLL-NO-VF-NEXT: [[VECTOR_RECUR1:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ 1, [[VECTOR_BODY]] ]
+; UNROLL-NO-VF-NEXT: [[TMP0]] = add nuw i64 [[VECTOR_RECUR]], 2
+; UNROLL-NO-VF-NEXT: [[TMP1:%.*]] = icmp eq i64 [[TMP0]], 1000
----------------
fhahn wrote:
can we keep the original names here, what's called `VECTOR_RECUR` is still the `INDEX`?
https://github.com/llvm/llvm-project/pull/125365
More information about the llvm-commits
mailing list