[llvm] 7bd8dfc - [LICM] Regenerate test checks (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 02:49:17 PST 2023
Author: Nikita Popov
Date: 2023-01-31T11:48:35+01:00
New Revision: 7bd8dfc20a52c4098b0b96b57d73649c644db32e
URL: https://github.com/llvm/llvm-project/commit/7bd8dfc20a52c4098b0b96b57d73649c644db32e
DIFF: https://github.com/llvm/llvm-project/commit/7bd8dfc20a52c4098b0b96b57d73649c644db32e.diff
LOG: [LICM] Regenerate test checks (NFC)
Added:
Modified:
llvm/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll
llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll b/llvm/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll
index bf58a09aab4b7..2419f9b6f323b 100644
--- a/llvm/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll
+++ b/llvm/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll
@@ -1,39 +1,42 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=licm -S | FileCheck %s
@a = external constant ptr
define void @test(i32 %count) {
+; CHECK-LABEL: @test(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP3:%.*]] = load ptr, ptr @a, align 8
+; CHECK-NEXT: br label [[FORCOND:%.*]]
+; CHECK: forcond:
+; CHECK-NEXT: [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FORBODY:%.*]] ]
+; CHECK-NEXT: [[CMP:%.*]] = icmp ult i32 [[I_0]], [[COUNT:%.*]]
+; CHECK-NEXT: br i1 [[CMP]], label [[FORBODY]], label [[AFTERFOR:%.*]]
+; CHECK: forbody:
+; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr float, ptr [[TMP3]], i32 [[I_0]]
+; CHECK-NEXT: [[TMP7:%.*]] = uitofp i32 [[I_0]] to float
+; CHECK-NEXT: store float [[TMP7]], ptr [[ARRAYIDX]], align 4
+; CHECK-NEXT: [[INC]] = add i32 [[I_0]], 1
+; CHECK-NEXT: br label [[FORCOND]]
+; CHECK: afterfor:
+; CHECK-NEXT: ret void
+;
entry:
- br label %forcond
-
-; CHECK: %tmp3 = load ptr, ptr @a
-; CHECK: br label %forcond
+ br label %forcond
forcond:
- %i.0 = phi i32 [ 0, %entry ], [ %inc, %forbody ]
- %cmp = icmp ult i32 %i.0, %count
- br i1 %cmp, label %forbody, label %afterfor
-
-; CHECK: %i.0 = phi i32 [ 0, %entry ], [ %inc, %forbody ]
-; CHECK: %cmp = icmp ult i32 %i.0, %count
-; CHECK: br i1 %cmp, label %forbody, label %afterfor
+ %i.0 = phi i32 [ 0, %entry ], [ %inc, %forbody ]
+ %cmp = icmp ult i32 %i.0, %count
+ br i1 %cmp, label %forbody, label %afterfor
forbody:
- %tmp3 = load ptr, ptr @a
- %arrayidx = getelementptr float, ptr %tmp3, i32 %i.0
- %tmp7 = uitofp i32 %i.0 to float
- store float %tmp7, ptr %arrayidx
- %inc = add i32 %i.0, 1
- br label %forcond
-
-; CHECK: %arrayidx = getelementptr float, ptr %tmp3, i32 %i.0
-; CHECK: %tmp7 = uitofp i32 %i.0 to float
-; CHECK: store float %tmp7, ptr %arrayidx
-; CHECK: %inc = add i32 %i.0, 1
-; CHECK: br label %forcond
+ %tmp3 = load ptr, ptr @a
+ %arrayidx = getelementptr float, ptr %tmp3, i32 %i.0
+ %tmp7 = uitofp i32 %i.0 to float
+ store float %tmp7, ptr %arrayidx
+ %inc = add i32 %i.0, 1
+ br label %forcond
afterfor:
- ret void
+ ret void
}
-
-; CHECK: ret void
diff --git a/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll b/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll
index ca3888f0f4b09..5bc677a609bef 100644
--- a/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll
+++ b/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=licm < %s | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s| FileCheck %s
;
@@ -12,64 +13,71 @@ target triple = "x86_64-unknown-linux-gnu"
define void @PR18688() {
; CHECK-LABEL: @PR18688(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br i1 undef, label [[RETURN:%.*]], label [[OUTER_PREHEADER:%.*]]
+; CHECK: outer.preheader:
+; CHECK-NEXT: [[Y_VAL:%.*]] = load i32, ptr @y, align 4
+; CHECK-NEXT: [[ICMP:%.*]] = icmp eq i32 [[Y_VAL]], 0
+; CHECK-NEXT: br label [[OUTER_HEADER:%.*]]
+; CHECK: outer.header:
+; CHECK-NEXT: br i1 undef, label [[OUTER_LATCH:%.*]], label [[INNER_PREHEADER:%.*]]
+; CHECK: inner.preheader:
+; CHECK-NEXT: br label [[INNER_HEADER:%.*]]
+; CHECK: inner.header:
+; CHECK-NEXT: [[TMP0:%.*]] = phi i32 [ [[TMP1:%.*]], [[INNER_LATCH:%.*]] ], [ 0, [[INNER_PREHEADER]] ]
+; CHECK-NEXT: br i1 undef, label [[INNER_BODY_RHS:%.*]], label [[INNER_LATCH]]
+; CHECK: inner.body.rhs:
+; CHECK-NEXT: br label [[INNER_LATCH]]
+; CHECK: inner.latch:
+; CHECK-NEXT: [[TMP1]] = phi i32 [ 0, [[INNER_BODY_RHS]] ], [ [[TMP0]], [[INNER_HEADER]] ]
+; CHECK-NEXT: br i1 [[ICMP]], label [[INNER_EXIT:%.*]], label [[INNER_HEADER]]
+; CHECK: inner.exit:
+; CHECK-NEXT: [[DOTLCSSA1:%.*]] = phi i32 [ [[TMP1]], [[INNER_LATCH]] ]
+; CHECK-NEXT: br label [[OUTER_LATCH]]
+; CHECK: outer.latch:
+; CHECK-NEXT: [[TMP2:%.*]] = phi i32 [ [[DOTLCSSA1]], [[INNER_EXIT]] ], [ 0, [[OUTER_HEADER]] ]
+; CHECK-NEXT: br i1 true, label [[OUTER_EXIT:%.*]], label [[OUTER_HEADER]]
+; CHECK: outer.exit:
+; CHECK-NEXT: [[DOTLCSSA:%.*]] = phi i32 [ [[TMP2]], [[OUTER_LATCH]] ]
+; CHECK-NEXT: store i32 [[DOTLCSSA]], ptr @x, align 4
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: return:
+; CHECK-NEXT: ret void
+;
entry:
br i1 undef, label %return, label %outer.preheader
outer.preheader:
br label %outer.header
-; CHECK: outer.preheader:
-; CHECK: br label %outer.header
outer.header:
store i32 0, ptr @x, align 4
br i1 undef, label %outer.latch, label %inner.preheader
-; CHECK: outer.header:
-; CHECK-NEXT: br i1 undef, label %outer.latch, label %inner.preheader
inner.preheader:
br label %inner.header
-; CHECK: inner.preheader:
-; CHECK-NEXT: br label %inner.header
inner.header:
br i1 undef, label %inner.body.rhs, label %inner.latch
-; CHECK: inner.header:
-; CHECK-NEXT: %[[PHI0:[^,]+]] = phi i32 [ %{{[^,]+}}, %inner.latch ], [ 0, %inner.preheader ]
-; CHECK-NEXT: br i1 undef, label %inner.body.rhs, label %inner.latch
inner.body.rhs:
store i32 0, ptr @x, align 4
br label %inner.latch
-; CHECK: inner.body.rhs:
-; CHECK-NEXT: br label %inner.latch
inner.latch:
%y_val = load i32, ptr @y, align 4
%icmp = icmp eq i32 %y_val, 0
br i1 %icmp, label %inner.exit, label %inner.header
-; CHECK: inner.latch:
-; CHECK-NEXT: %[[PHI1:[^,]+]] = phi i32 [ 0, %inner.body.rhs ], [ %[[PHI0]], %inner.header ]
-; CHECK-NEXT: br i1 %{{[^,]+}}, label %inner.exit, label %inner.header
inner.exit:
br label %outer.latch
-; CHECK: inner.exit:
-; CHECK-NEXT: %[[INNER_LCSSA:[^,]+]] = phi i32 [ %[[PHI1]], %inner.latch ]
-; CHECK-NEXT: br label %outer.latch
outer.latch:
br i1 undef, label %outer.exit, label %outer.header
-; CHECK: outer.latch:
-; CHECK-NEXT: %[[PHI2:[^,]+]] = phi i32 [ %[[INNER_LCSSA]], %inner.exit ], [ 0, %outer.header ]
-; CHECK-NEXT: br i1 {{.*}}, label %outer.exit, label %outer.header
outer.exit:
br label %return
-; CHECK: outer.exit:
-; CHECK-NEXT: %[[OUTER_LCSSA:[^,]+]] = phi i32 [ %[[PHI2]], %outer.latch ]
-; CHECK-NEXT: store i32 %[[OUTER_LCSSA]]
-; CHECK-NEXT: br label %return
return:
ret void
More information about the llvm-commits
mailing list