]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff
Rollup merge of #71051 - ryr3:fix_try_into, r=estebank
[rust.git] / src / test / mir-opt / copy_propagation_arg / rustc.foo.CopyPropagation.diff
1 - // MIR for `foo` before CopyPropagation
2 + // MIR for `foo` after CopyPropagation
3   
4   fn foo(_1: u8) -> () {
5       debug x => _1;                       // in scope 0 at $DIR/copy_propagation_arg.rs:9:8: 9:13
6       let mut _0: ();                      // return place in scope 0 at $DIR/copy_propagation_arg.rs:9:19: 9:19
7       let mut _2: u8;                      // in scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
8       let mut _3: u8;                      // in scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
9   
10       bb0: {
11           StorageLive(_2);                 // bb0[0]: scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
12           StorageLive(_3);                 // bb0[1]: scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
13           _3 = _1;                         // bb0[2]: scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
14           _2 = const dummy(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
15                                            // ty::Const
16                                            // + ty: fn(u8) -> u8 {dummy}
17                                            // + val: Value(Scalar(<ZST>))
18                                            // mir::Constant
19                                            // + span: $DIR/copy_propagation_arg.rs:11:9: 11:14
20                                            // + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(Scalar(<ZST>)) }
21       }
22   
23       bb1: {
24           StorageDead(_3);                 // bb1[0]: scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
25           _1 = move _2;                    // bb1[1]: scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
26           StorageDead(_2);                 // bb1[2]: scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
27           nop;                             // bb1[3]: scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2
28           return;                          // bb1[4]: scope 0 at $DIR/copy_propagation_arg.rs:12:2: 12:2
29       }
30   }
31