]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / mir-opt / const_prop / control_flow_simplification.hello.ConstProp.diff
1 - // MIR for `hello` before ConstProp
2 + // MIR for `hello` after ConstProp
3
4 fn hello() -> () {
5 let mut _0: (); // return place in scope 0 at $DIR/control_flow_simplification.rs:+0:14: +0:14
6 let mut _1: bool; // in scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
7 let mut _2: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
8
9 bb0: {
10 StorageLive(_1); // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
11 _1 = const _; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
12 - switchInt(move _1) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
13 + switchInt(const false) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
14 }
15
16 bb1: {
17 StorageLive(_2); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
18 _2 = begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
19 // mir::Constant
20 // + span: $SRC_DIR/std/src/panic.rs:LL:COL
21 // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) }
22 // mir::Constant
23 // + span: $SRC_DIR/std/src/panic.rs:LL:COL
24 // + literal: Const { ty: &str, val: Value(Slice(..)) }
25 }
26
27 bb2: {
28 StorageDead(_1); // scope 0 at $DIR/control_flow_simplification.rs:+3:5: +3:6
29 return; // scope 0 at $DIR/control_flow_simplification.rs:+4:2: +4:2
30 }
31 }
32