rust/tests/mir-opt/const_prop/while_let_loops.change_loop_body.GVN.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.4 KiB
Diff
Raw Normal View History

2023-09-20 16:43:33 -05:00
- // MIR for `change_loop_body` before GVN
+ // MIR for `change_loop_body` after GVN
fn change_loop_body() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: i32;
let mut _2: ();
let mut _3: std::option::Option<u32>;
let mut _4: isize;
let mut _5: !;
let mut _6: !;
let _7: ();
let mut _8: !;
scope 1 {
2023-06-06 08:47:00 -05:00
debug _x => _1;
2022-06-10 16:12:58 -05:00
scope 2 {
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
_1 = const 0_i32;
StorageLive(_3);
2023-09-20 16:43:33 -05:00
- _3 = Option::<u32>::None;
2023-06-06 08:47:00 -05:00
- _4 = discriminant(_3);
- switchInt(move _4) -> [1: bb1, otherwise: bb3];
2023-09-20 16:43:33 -05:00
+ _3 = const Option::<u32>::None;
2023-06-06 08:47:00 -05:00
+ _4 = const 0_isize;
+ switchInt(const 0_isize) -> [1: bb1, otherwise: bb3];
}
bb1: {
2023-09-20 16:43:33 -05:00
- switchInt(copy ((_3 as Some).0: u32)) -> [0: bb2, otherwise: bb3];
+ switchInt(const Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: u32) -> [0: bb2, otherwise: bb3];
}
bb2: {
2023-06-06 08:47:00 -05:00
_1 = const 1_i32;
_0 = const ();
goto -> bb4;
}
2021-09-02 04:18:08 -05:00
bb3: {
2023-06-06 08:47:00 -05:00
StorageLive(_7);
_0 = const ();
StorageDead(_7);
goto -> bb4;
2021-09-02 04:18:08 -05:00
}
bb4: {
2023-06-06 08:47:00 -05:00
StorageDead(_3);
StorageDead(_1);
return;
}
2023-09-20 16:43:33 -05:00
+ }
+
+ ALLOC0 (size: 8, align: 4) {
+ 00 00 00 00 __ __ __ __ │ ....░░░░
}