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.
This commit is contained in:
Matthias Krüger 2022-12-17 00:45:54 +01:00 committed by GitHub
commit 803ce455a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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