Skip to content

Commit c345080

Browse files
[NFC] Remove undef in swp-const-tc1.ll test (#147287)
Change undef branch conditions to the values that loop-simplify gives them, and handle other undef values by using extra arguments. I'm making this change because of an upcoming loop strength reduction change that results in instsimplify removing more instructions due to them using undef, causing the test checks to fail.
1 parent 2b28d10 commit c345080

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/test/CodeGen/Hexagon/swp-const-tc1.ll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
; CHECK: memb(r{{[0-9]+}}+#0) =
1414

1515
; Function Attrs: nounwind optsize
16-
define void @f0(i1 %x) #0 {
16+
define void @f0(i1 %x, i32 %y, ptr %p1, ptr %p2, ptr %p3) #0 {
1717
b0:
1818
br label %b1
1919

2020
b1: ; preds = %b5, %b0
21-
%v0 = load i16, ptr undef, align 2, !tbaa !0
21+
%v0 = load i16, ptr %p1, align 2, !tbaa !0
2222
%v1 = sext i16 %v0 to i32
23-
%v2 = load i16, ptr undef, align 2, !tbaa !0
23+
%v2 = load i16, ptr %p2, align 2, !tbaa !0
2424
%v3 = sext i16 %v2 to i32
2525
%v4 = and i32 %v1, 7
2626
%v5 = and i32 %v3, 7
@@ -31,8 +31,8 @@ b2: ; preds = %b4, %b1
3131

3232
b3: ; preds = %b3, %b2
3333
%v6 = phi i32 [ 0, %b2 ], [ %v22, %b3 ]
34-
%v7 = add i32 %v6, undef
35-
%v8 = icmp slt i32 undef, %v7
34+
%v7 = add i32 %v6, %y
35+
%v8 = icmp slt i32 %y, %v7
3636
%v9 = add nsw i32 %v7, 1
3737
%v10 = select i1 %x, i32 1, i32 %v9
3838
%v11 = add i32 %v10, 0
@@ -46,16 +46,16 @@ b3: ; preds = %b3, %b2
4646
%v19 = add i32 %v18, 0
4747
%v20 = lshr i32 %v19, 6
4848
%v21 = trunc i32 %v20 to i8
49-
store i8 %v21, ptr undef, align 1, !tbaa !4
49+
store i8 %v21, ptr %p3, align 1, !tbaa !4
5050
%v22 = add i32 %v6, 1
5151
%v23 = icmp eq i32 %v22, 2
5252
br i1 %v23, label %b4, label %b3
5353

5454
b4: ; preds = %b3
55-
br i1 undef, label %b5, label %b2
55+
br i1 true, label %b5, label %b2
5656

5757
b5: ; preds = %b4
58-
br i1 undef, label %b1, label %b6
58+
br i1 false, label %b1, label %b6
5959

6060
b6: ; preds = %b5
6161
ret void

0 commit comments

Comments
 (0)