]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/sroa.escaping.ScalarReplacementOfAggregates.diff
Mark 'atomic_mut_ptr' methods const
[rust.git] / tests / mir-opt / sroa.escaping.ScalarReplacementOfAggregates.diff
1 - // MIR for `escaping` before ScalarReplacementOfAggregates
2 + // MIR for `escaping` after ScalarReplacementOfAggregates
3   
4   fn escaping() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/sroa.rs:+0:19: +0:19
6       let _1: ();                          // in scope 0 at $DIR/sroa.rs:+2:5: +2:42
7       let mut _2: *const u32;              // in scope 0 at $DIR/sroa.rs:+2:7: +2:41
8       let _3: &u32;                        // in scope 0 at $DIR/sroa.rs:+2:7: +2:41
9       let _4: Escaping;                    // in scope 0 at $DIR/sroa.rs:+2:8: +2:39
10       let mut _5: u32;                     // in scope 0 at $DIR/sroa.rs:+2:34: +2:37
11   
12       bb0: {
13           StorageLive(_1);                 // scope 0 at $DIR/sroa.rs:+2:5: +2:42
14           StorageLive(_2);                 // scope 0 at $DIR/sroa.rs:+2:7: +2:41
15           StorageLive(_3);                 // scope 0 at $DIR/sroa.rs:+2:7: +2:41
16           StorageLive(_4);                 // scope 0 at $DIR/sroa.rs:+2:8: +2:39
17           StorageLive(_5);                 // scope 0 at $DIR/sroa.rs:+2:34: +2:37
18           _5 = g() -> bb1;                 // scope 0 at $DIR/sroa.rs:+2:34: +2:37
19                                            // mir::Constant
20                                            // + span: $DIR/sroa.rs:78:34: 78:35
21                                            // + literal: Const { ty: fn() -> u32 {g}, val: Value(<ZST>) }
22       }
23   
24       bb1: {
25           _4 = Escaping { a: const 1_u32, b: const 2_u32, c: move _5 }; // scope 0 at $DIR/sroa.rs:+2:8: +2:39
26           StorageDead(_5);                 // scope 0 at $DIR/sroa.rs:+2:38: +2:39
27           _3 = &(_4.0: u32);               // scope 0 at $DIR/sroa.rs:+2:7: +2:41
28           _2 = &raw const (*_3);           // scope 0 at $DIR/sroa.rs:+2:7: +2:41
29           _1 = f(move _2) -> bb2;          // scope 0 at $DIR/sroa.rs:+2:5: +2:42
30                                            // mir::Constant
31                                            // + span: $DIR/sroa.rs:78:5: 78:6
32                                            // + literal: Const { ty: fn(*const u32) {f}, val: Value(<ZST>) }
33       }
34   
35       bb2: {
36           StorageDead(_2);                 // scope 0 at $DIR/sroa.rs:+2:41: +2:42
37           StorageDead(_4);                 // scope 0 at $DIR/sroa.rs:+2:42: +2:43
38           StorageDead(_3);                 // scope 0 at $DIR/sroa.rs:+2:42: +2:43
39           StorageDead(_1);                 // scope 0 at $DIR/sroa.rs:+2:42: +2:43
40           _0 = const ();                   // scope 0 at $DIR/sroa.rs:+0:19: +3:2
41           return;                          // scope 0 at $DIR/sroa.rs:+3:2: +3:2
42       }
43   }
44