Skip to content

Commit 365bf43

Browse files
committed
[LSR] Regenerate test checks (NFC)
Check output IR instead of debug output. The debug output will change in an upcoming patch in an irrecoverable way.
1 parent f8562e2 commit 365bf43

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

llvm/test/Transforms/LoopStrengthReduce/Power/incomplete-phi.ll

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
; REQUIRES: asserts
2-
; RUN: opt -loop-reduce -debug-only=loop-reduce -S < %s 2>&1 | FileCheck %s
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2+
; RUN: opt -loop-reduce -S < %s 2>&1 | FileCheck %s
33

44
target datalayout = "e-m:e-i64:64-n32:64"
55
target triple = "powerpc64le-unknown-linux-gnu"
6-
;
6+
77
; %lsr.iv2 and %lsr.iv10 are in same bb, but they are not equal since start
88
; value are different.
99
;
@@ -14,17 +14,44 @@ target triple = "powerpc64le-unknown-linux-gnu"
1414
; %lsr.iv10 = phi [0 x %0]* [ %2, %bb18 ], [ %arg, %bb ]
1515
;
1616
; Make sure two incomplete phis will not be marked as congruent.
17-
;
18-
; CHECK: One incomplete PHI is found: %[[IV:.*]] = phi ptr
19-
; CHECK: One incomplete PHI is found: %[[IV2:.*]] = phi ptr
20-
; CHECK-NOT: Eliminated congruent iv: %[[IV]]
21-
; CHECK-NOT: Original iv: %[[IV2]]
22-
; CHECK-NOT: Eliminated congruent iv: %[[IV2]]
23-
; CHECK-NOT: Original iv: %[[IV]]
2417

2518
%0 = type <{ float }>
2619

2720
define void @foo(ptr %arg) {
21+
; CHECK-LABEL: define void @foo(
22+
; CHECK-SAME: ptr [[ARG:%.*]]) {
23+
; CHECK-NEXT: bb:
24+
; CHECK-NEXT: [[I:%.*]] = getelementptr [0 x %0], ptr [[ARG]], i64 0, i64 -1
25+
; CHECK-NEXT: [[I2:%.*]] = getelementptr i8, ptr [[I]], i64 4
26+
; CHECK-NEXT: [[SCEVGEP:%.*]] = getelementptr i8, ptr [[ARG]], i64 396
27+
; CHECK-NEXT: br label [[BB3:%.*]]
28+
; CHECK: bb3:
29+
; CHECK-NEXT: [[LSR_IV7:%.*]] = phi ptr [ [[SCEVGEP8:%.*]], [[BB18:%.*]] ], [ [[I2]], [[BB:%.*]] ]
30+
; CHECK-NEXT: [[LSR_IV5:%.*]] = phi i64 [ [[LSR_IV_NEXT6:%.*]], [[BB18]] ], [ 4, [[BB]] ]
31+
; CHECK-NEXT: [[LSR_IV1:%.*]] = phi ptr [ [[SCEVGEP2:%.*]], [[BB18]] ], [ [[SCEVGEP]], [[BB]] ]
32+
; CHECK-NEXT: br i1 true, label [[BB22_PREHEADER:%.*]], label [[BB9_PREHEADER:%.*]]
33+
; CHECK: bb9.preheader:
34+
; CHECK-NEXT: br label [[BB9:%.*]]
35+
; CHECK: bb9:
36+
; CHECK-NEXT: [[LSR_IV9:%.*]] = phi ptr [ [[LSR_IV7]], [[BB9_PREHEADER]] ], [ [[SCEVGEP10:%.*]], [[BB9]] ]
37+
; CHECK-NEXT: store <4 x float> undef, ptr [[LSR_IV9]], align 4
38+
; CHECK-NEXT: [[SCEVGEP10]] = getelementptr i8, ptr [[LSR_IV9]], i64 128
39+
; CHECK-NEXT: br i1 true, label [[BB17:%.*]], label [[BB9]]
40+
; CHECK: bb17:
41+
; CHECK-NEXT: br i1 false, label [[BB18]], label [[BB22_PREHEADER]]
42+
; CHECK: bb22.preheader:
43+
; CHECK-NEXT: br label [[BB22:%.*]]
44+
; CHECK: bb18:
45+
; CHECK-NEXT: [[LSR_IV_NEXT6]] = add nuw nsw i64 [[LSR_IV5]], 4
46+
; CHECK-NEXT: [[SCEVGEP2]] = getelementptr i8, ptr [[LSR_IV1]], i64 [[LSR_IV5]]
47+
; CHECK-NEXT: [[SCEVGEP8]] = getelementptr i8, ptr [[LSR_IV7]], i64 [[LSR_IV5]]
48+
; CHECK-NEXT: br label [[BB3]]
49+
; CHECK: bb22:
50+
; CHECK-NEXT: [[LSR_IV3:%.*]] = phi ptr [ [[LSR_IV1]], [[BB22_PREHEADER]] ], [ [[SCEVGEP4:%.*]], [[BB22]] ]
51+
; CHECK-NEXT: store float undef, ptr [[LSR_IV3]], align 4
52+
; CHECK-NEXT: [[SCEVGEP4]] = getelementptr i8, ptr [[LSR_IV3]], i64 4
53+
; CHECK-NEXT: br label [[BB22]]
54+
;
2855
bb:
2956
%i = getelementptr inbounds [0 x %0], ptr %arg, i64 0, i64 -1
3057
%i2 = getelementptr i8, ptr %i, i64 4

0 commit comments

Comments
 (0)