]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
Rollup merge of #96609 - ibraheemdev:arc-downcast-unchecked, r=m-ou-se
[rust.git] / src / test / 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:11:14: 11:14
6       let mut _1: bool;                    // in scope 0 at $DIR/control-flow-simplification.rs:12:8: 12: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:12:8: 12:21
11 -         _1 = const <bool as NeedsDrop>::NEEDS; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
12 -         switchInt(move _1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
13 +         _1 = const false;                // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
14 +         switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
15       }
16   
17       bb1: {
18           StorageLive(_2);                 // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
19           _2 = begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
20                                            // mir::Constant
21                                            // + span: $SRC_DIR/std/src/panic.rs:LL:COL
22                                            // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(Scalar(<ZST>)) }
23                                            // mir::Constant
24                                            // + span: $SRC_DIR/std/src/panic.rs:LL:COL
25                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
26       }
27   
28       bb2: {
29           nop;                             // scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6
30           StorageDead(_1);                 // scope 0 at $DIR/control-flow-simplification.rs:14:5: 14:6
31           return;                          // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
32       }
33   }
34