@@ -20,8 +20,8 @@ fn simple() {
2020 // CHECK: [[e]] = const E::V1(0_i32);
2121 let e = E :: V1 ( 0 ) ;
2222
23- // CHECK: switchInt(const 0_isize) -> [0: bb [[target_bb:[0-9]+ ]], 1: bb1, otherwise: bb2];
24- // CHECK: bb [[target_bb]]: {
23+ // CHECK: switchInt(const 0_isize) -> [0: [[target_bb:bb.* ]], 1: bb1, otherwise: bb2];
24+ // CHECK: [[target_bb]]: {
2525 // CHECK: [[x]] = const 0_i32;
2626 let x = match e { E :: V1 ( x1) => x1, E :: V2 ( x2) => x2 } ;
2727}
@@ -36,8 +36,8 @@ fn constant() {
3636
3737 // CHECK: [[e]] = const _;
3838 let e = C ;
39- // CHECK: switchInt(const 0_isize) -> [0: bb [[target_bb:[0-9]+ ]], 1: bb1, otherwise: bb2];
40- // CHECK: bb [[target_bb]]: {
39+ // CHECK: switchInt(const 0_isize) -> [0: [[target_bb:bb.* ]], 1: bb1, otherwise: bb2];
40+ // CHECK: [[target_bb]]: {
4141 // CHECK: [[x]] = const 0_i32;
4242 let x = match e { E :: V1 ( x1) => x1, E :: V2 ( x2) => x2 } ;
4343}
@@ -55,8 +55,8 @@ fn statics() {
5555
5656 // CHECK: [[e1]] = const E::V1(0_i32);
5757 let e1 = C ;
58- // CHECK: switchInt(const 0_isize) -> [0: bb[[target_bb1:[0-9]+ ]], 1: bb1, otherwise: bb2];
59- // CHECK: bb [[target_bb]]: {
58+ // CHECK: switchInt(const 0_isize) -> [0: [[target_bb:bb.* ]], 1: bb1, otherwise: bb2];
59+ // CHECK: [[target_bb]]: {
6060 // CHECK: [[x1]] = const 0_i32;
6161 let x1 = match e1 { E :: V1 ( x11) => x11, E :: V2 ( x12) => x12 } ;
6262
@@ -65,7 +65,8 @@ fn statics() {
6565 // CHECK: [[t:_.*]] = const {alloc2: &&E};
6666 // CHECK: [[e2]] = (*[[t]]);
6767 let e2 = RC ;
68- // CHECK: switchInt(move _{{[0-9]+}}) -> [0: bb{{[0-9]+}}, 1: bb{{[0-9]+}}, otherwise: bb{{[0-9]+}}];
68+
69+ // CHECK: switchInt({{move _.*}}) -> {{.*}}
6970 // FIXME: add checks for x2. Currently, their MIRs are not symmetric in the two
7071 // switch branches.
7172 // One is `_9 = &(*_12) and another is `_9 = _11`. It is different from what we can
@@ -91,10 +92,10 @@ fn mutate_discriminant() -> u8 {
9192 place!( Field ( Field ( Variant ( x, 1 ) , 0 ) , 0 ) ) = 0_usize ;
9293 // So we cannot know the value of this discriminant.
9394
94- // CHECK: [[a:_.*]] = discriminant(_{{[0-9] *}});
95+ // CHECK: [[a:_.*]] = discriminant({{_. *}});
9596 let a = Discriminant ( x) ;
9697
97- // CHECK: switchInt([[a]]) -> [0: bb{{[0-9]+ }}, otherwise: bb{{[0-9]+ }}];
98+ // CHECK: switchInt([[a]]) -> [0: {{bb.* }}, otherwise: {{bb.* }}];
9899 match a {
99100 0 => bb1,
100101 _ => bad,
@@ -118,7 +119,7 @@ fn multiple(x: bool, i: u8) {
118119 // CHECK: debug e => [[e:_.*]];
119120 // CHECK: debug x2 => [[x2:_.*]];
120121 let e = if x {
121- // CHECK: [[e]] = Option::<u8>::Some(move _{{[0-9]+ }});
122+ // CHECK: [[e]] = Option::<u8>::Some(move {{_.* }});
122123 Some ( i)
123124 } else {
124125 // CHECK: [[e]] = Option::<u8>::None;
@@ -128,7 +129,7 @@ fn multiple(x: bool, i: u8) {
128129 // discriminant(e) => Top
129130 // (e as Some).0 => Top
130131 // CHECK: [[x2]] = const 0_u8;
131- // CHECK: [[x2]] = _{{[0-9]+}}
132+ // CHECK: [[x2]] = {{_.*}};
132133 let x2 = match e { Some ( i) => i, None => 0 } ;
133134 // Therefore, `x2` should be `Top` here, and no replacement shall happen.
134135 let y = x2;
0 commit comments