Skip to content

Commit 8e5910f

Browse files
committed
Separate test cases into bbs.
1 parent c17e878 commit 8e5910f

8 files changed

+1207
-824
lines changed

tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
_5 = (*_2); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
2525
_0 = opaque::<i32>(_5) -> bb3; // scope 0 at $DIR/reference_prop.rs:+16:13: +16:38
2626
// mir::Constant
27-
// + span: $DIR/reference_prop.rs:357:28: 357:34
27+
// + span: $DIR/reference_prop.rs:382:28: 382:34
2828
// + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
2929
}
3030

tests/mir-opt/reference_prop.maybe_dead.ReferencePropagation.diff

+17-11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
let mut _5: &mut i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
1010
let mut _6: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
1111
let mut _7: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
12+
let mut _8: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
1213

1314
bb0: {
1415
StorageLive(_2); // scope 0 at $DIR/reference_prop.rs:+7:13: +7:27
@@ -18,33 +19,38 @@
1819
_4 = &_2; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
1920
_5 = &mut _3; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
2021
(*_5) = const 7_i32; // scope 0 at $DIR/reference_prop.rs:+14:13: +14:19
21-
switchInt(_1) -> [1: bb1, otherwise: bb2]; // scope 0 at $DIR/reference_prop.rs:+15:13: +15:46
22+
- _6 = (*_4); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
23+
+ _6 = _2; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
24+
switchInt(_1) -> [1: bb1, otherwise: bb2]; // scope 0 at $DIR/reference_prop.rs:+17:13: +17:46
2225
}
2326

2427
bb1: {
25-
StorageDead(_2); // scope 0 at $DIR/reference_prop.rs:+18:13: +18:27
26-
StorageDead(_3); // scope 0 at $DIR/reference_prop.rs:+19:13: +19:27
27-
goto -> bb2; // scope 0 at $DIR/reference_prop.rs:+20:13: +20:22
28+
StorageDead(_2); // scope 0 at $DIR/reference_prop.rs:+20:13: +20:27
29+
StorageDead(_3); // scope 0 at $DIR/reference_prop.rs:+21:13: +21:27
30+
_0 = opaque::<i32>(_6) -> bb2; // scope 0 at $DIR/reference_prop.rs:+22:13: +22:38
31+
// mir::Constant
32+
// + span: $DIR/reference_prop.rs:416:28: 416:34
33+
// + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
2834
}
2935

3036
bb2: {
31-
_6 = (*_4); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
32-
_0 = opaque::<i32>(_6) -> bb3; // scope 0 at $DIR/reference_prop.rs:+25:13: +25:38
37+
_7 = (*_4); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
38+
_0 = opaque::<i32>(_7) -> bb3; // scope 0 at $DIR/reference_prop.rs:+27:13: +27:38
3339
// mir::Constant
34-
// + span: $DIR/reference_prop.rs:394:28: 394:34
40+
// + span: $DIR/reference_prop.rs:421:28: 421:34
3541
// + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
3642
}
3743

3844
bb3: {
39-
_7 = (*_5); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
40-
_0 = opaque::<i32>(_7) -> bb4; // scope 0 at $DIR/reference_prop.rs:+31:13: +31:43
45+
_8 = (*_5); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
46+
_0 = opaque::<i32>(_8) -> bb4; // scope 0 at $DIR/reference_prop.rs:+33:13: +33:43
4147
// mir::Constant
42-
// + span: $DIR/reference_prop.rs:400:33: 400:39
48+
// + span: $DIR/reference_prop.rs:427:33: 427:39
4349
// + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
4450
}
4551

4652
bb4: {
47-
return; // scope 0 at $DIR/reference_prop.rs:+34:13: +34:21
53+
return; // scope 0 at $DIR/reference_prop.rs:+36:13: +36:21
4854
}
4955
}
5056

tests/mir-opt/reference_prop.multiple_storage.ReferencePropagation.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
_3 = (*_2); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
1717
_0 = opaque::<i32>(_3) -> bb1; // scope 0 at $DIR/reference_prop.rs:+14:13: +14:43
1818
// mir::Constant
19-
// + span: $DIR/reference_prop.rs:331:33: 331:39
19+
// + span: $DIR/reference_prop.rs:356:33: 356:39
2020
// + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
2121
}
2222

0 commit comments

Comments
 (0)