Skip to content

Commit 8101884

Browse files
committed
codegen tests: Tolerate range() qualifications in enum tests
Current LLVM can infer range bounds on the i8s involved with these tests, and annotates it. Accept these bounds if present.
1 parent a8a1d3a commit 8101884

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/codegen/enum/enum-match.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub enum Enum0 {
1111
B,
1212
}
1313

14-
// CHECK: define noundef i8 @match0{{.*}}
14+
// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match0{{.*}}
1515
// CHECK-NEXT: start:
1616
// CHECK-NEXT: %1 = icmp eq i8 %0, 2
1717
// CHECK-NEXT: %2 = and i8 %0, 1
@@ -32,7 +32,7 @@ pub enum Enum1 {
3232
C,
3333
}
3434

35-
// CHECK: define noundef i8 @match1{{.*}}
35+
// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match1{{.*}}
3636
// CHECK-NEXT: start:
3737
// CHECK-NEXT: %1 = add i8 %0, -2
3838
// CHECK-NEXT: %2 = zext i8 %1 to i64
@@ -91,7 +91,7 @@ pub enum Enum2 {
9191
E,
9292
}
9393

94-
// CHECK: define noundef i8 @match2{{.*}}
94+
// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match2{{.*}}
9595
// CHECK-NEXT: start:
9696
// CHECK-NEXT: %1 = add i8 %0, 2
9797
// CHECK-NEXT: %2 = zext i8 %1 to i64

0 commit comments

Comments
 (0)