Skip to content

Commit d81e444

Browse files
authored
Rollup merge of #124543 - maurer:llvm-range, r=nikic
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. `@rustbot` label: +llvm-main cc `@durin42`
2 parents ed00f66 + 8101884 commit d81e444

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: 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)