Skip to content

Commit 1adda9a

Browse files
committed
Add FileCheck to terminator.rs and tuple.rs
1 parent 732f6a1 commit 1adda9a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
// skip-filecheck
21
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
32
// unit-test: DataflowConstProp
43

54
fn foo(n: i32) {}
65

76
// EMIT_MIR terminator.main.DataflowConstProp.diff
7+
8+
// CHECK-LABEL: fn main
89
fn main() {
910
let a = 1;
1011
// Checks that we propagate into terminators.
12+
// CHECK: {{_[0-9]+}} = foo(const 2_i32) -> [return: {{bb[0-9]+}}, unwind continue];
1113
foo(a + 1);
1214
}
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
1-
// skip-filecheck
21
// unit-test: DataflowConstProp
32
// EMIT_MIR_FOR_EACH_BIT_WIDTH
43

54
// EMIT_MIR tuple.main.DataflowConstProp.diff
5+
6+
// CHECK-LABEL: fn main
67
fn main() {
8+
// CHECK: debug a => [[a:_[0-9]+]];
9+
// CHECK: debug b => [[b:_[0-9]+]];
10+
// CHECK: debug c => [[c:_[0-9]+]];
11+
// CHECK: debug d => [[d:_[0-9]+]];
12+
13+
// CHECK: [[a]] = const (1_i32, 2_i32);
714
let mut a = (1, 2);
15+
16+
// CHECK: [[b]] = const 6_i32;
817
let b = a.0 + a.1 + 3;
18+
19+
// CHECK: [[a]] = const (2_i32, 3_i32);
920
a = (2, 3);
21+
22+
// CHECK: [[c]] = const 11_i32;
1023
let c = a.0 + a.1 + b;
1124

25+
// CHECK: [[d]] = (const 6_i32, const (2_i32, 3_i32), const 11_i32);
1226
let d = (b, a, c);
1327
}

0 commit comments

Comments
 (0)