Skip to content

Commit 803ce45

Browse files
authored
Rollup merge of #105802 - chbaker0:enum-match-filecheck, r=tmiasko
Make enum-match.rs test robust against variable name changes https://reviews.llvm.org/D140192 caused the LLVM variable generated for enum discriminant checks to be named differently (%narrow vs %1). This adjusts the test CHECK directives to match any name.
2 parents 11de52a + 8751d3b commit 803ce45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/codegen/enum-match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ pub enum Enum1 {
3434

3535
// CHECK: define i8 @match1{{.*}}
3636
// CHECK-NEXT: start:
37-
// CHECK-NEXT: %1 = {{.*}}call i8 @llvm.usub.sat.i8(i8 %0, i8 1)
38-
// CHECK-NEXT: switch i8 %1, label {{.*}} [
37+
// CHECK-NEXT: [[DISCR:%.*]] = {{.*}}call i8 @llvm.usub.sat.i8(i8 %0, i8 1)
38+
// CHECK-NEXT: switch i8 [[DISCR]], label {{.*}} [
3939
#[no_mangle]
4040
pub fn match1(e: Enum1) -> u8 {
4141
use Enum1::*;

0 commit comments

Comments
 (0)