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.
This commit is contained in:
Matthew Maurer 2024-04-29 23:54:27 +00:00
parent a8a1d3a771
commit 8101884b37
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ pub enum Enum0 {
B,
}
// CHECK: define noundef i8 @match0{{.*}}
// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match0{{.*}}
// CHECK-NEXT: start:
// CHECK-NEXT: %1 = icmp eq i8 %0, 2
// CHECK-NEXT: %2 = and i8 %0, 1
@ -32,7 +32,7 @@ pub enum Enum1 {
C,
}
// CHECK: define noundef i8 @match1{{.*}}
// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match1{{.*}}
// CHECK-NEXT: start:
// CHECK-NEXT: %1 = add i8 %0, -2
// CHECK-NEXT: %2 = zext i8 %1 to i64
@ -91,7 +91,7 @@ pub enum Enum2 {
E,
}
// CHECK: define noundef i8 @match2{{.*}}
// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match2{{.*}}
// CHECK-NEXT: start:
// CHECK-NEXT: %1 = add i8 %0, 2
// CHECK-NEXT: %2 = zext i8 %1 to i64