]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/inst_combine_deref.opt_struct.InstCombine.diff
Run the test with explicit -O such that Add is generated instead of CheckedAdd
[rust.git] / src / test / mir-opt / inst_combine_deref.opt_struct.InstCombine.diff
1 - // MIR for `opt_struct` before InstCombine
2 + // MIR for `opt_struct` after InstCombine
3   
4   fn opt_struct(_1: S) -> u64 {
5       debug s => _1;                       // in scope 0 at $DIR/inst_combine_deref.rs:30:15: 30:16
6       let mut _0: u64;                     // return place in scope 0 at $DIR/inst_combine_deref.rs:30:24: 30:27
7       let _2: &u64;                        // in scope 0 at $DIR/inst_combine_deref.rs:31:9: 31:10
8       let mut _5: u64;                     // in scope 0 at $DIR/inst_combine_deref.rs:34:5: 34:7
9       let mut _6: u64;                     // in scope 0 at $DIR/inst_combine_deref.rs:34:10: 34:11
10       scope 1 {
11           debug a => _2;                   // in scope 1 at $DIR/inst_combine_deref.rs:31:9: 31:10
12           let _3: &u64;                    // in scope 1 at $DIR/inst_combine_deref.rs:32:9: 32:10
13           scope 2 {
14               debug b => _3;               // in scope 2 at $DIR/inst_combine_deref.rs:32:9: 32:10
15               let _4: u64;                 // in scope 2 at $DIR/inst_combine_deref.rs:33:9: 33:10
16               scope 3 {
17                   debug x => _4;           // in scope 3 at $DIR/inst_combine_deref.rs:33:9: 33:10
18               }
19           }
20       }
21   
22       bb0: {
23           StorageLive(_2);                 // scope 0 at $DIR/inst_combine_deref.rs:31:9: 31:10
24           _2 = &(_1.0: u64);               // scope 0 at $DIR/inst_combine_deref.rs:31:13: 31:17
25           StorageLive(_3);                 // scope 1 at $DIR/inst_combine_deref.rs:32:9: 32:10
26           _3 = &(_1.1: u64);               // scope 1 at $DIR/inst_combine_deref.rs:32:13: 32:17
27           StorageLive(_4);                 // scope 2 at $DIR/inst_combine_deref.rs:33:9: 33:10
28 -         _4 = (*_2);                      // scope 2 at $DIR/inst_combine_deref.rs:33:13: 33:15
29 +         _4 = (_1.0: u64);                // scope 2 at $DIR/inst_combine_deref.rs:33:13: 33:15
30           StorageLive(_5);                 // scope 3 at $DIR/inst_combine_deref.rs:34:5: 34:7
31 -         _5 = (*_3);                      // scope 3 at $DIR/inst_combine_deref.rs:34:5: 34:7
32 +         _5 = (_1.1: u64);                // scope 3 at $DIR/inst_combine_deref.rs:34:5: 34:7
33           StorageLive(_6);                 // scope 3 at $DIR/inst_combine_deref.rs:34:10: 34:11
34           _6 = _4;                         // scope 3 at $DIR/inst_combine_deref.rs:34:10: 34:11
35           _0 = Add(move _5, move _6);      // scope 3 at $DIR/inst_combine_deref.rs:34:5: 34:11
36           StorageDead(_6);                 // scope 3 at $DIR/inst_combine_deref.rs:34:10: 34:11
37           StorageDead(_5);                 // scope 3 at $DIR/inst_combine_deref.rs:34:10: 34:11
38           StorageDead(_4);                 // scope 2 at $DIR/inst_combine_deref.rs:35:1: 35:2
39           StorageDead(_3);                 // scope 1 at $DIR/inst_combine_deref.rs:35:1: 35:2
40           StorageDead(_2);                 // scope 0 at $DIR/inst_combine_deref.rs:35:1: 35:2
41           return;                          // scope 0 at $DIR/inst_combine_deref.rs:35:2: 35:2
42       }
43   }
44