diff options
Diffstat (limited to '')
-rw-r--r-- | tests/mir-opt/sroa/structs.flat.ScalarReplacementOfAggregates.diff | 119 |
1 files changed, 58 insertions, 61 deletions
diff --git a/tests/mir-opt/sroa/structs.flat.ScalarReplacementOfAggregates.diff b/tests/mir-opt/sroa/structs.flat.ScalarReplacementOfAggregates.diff index 1aa11d17b..a84048365 100644 --- a/tests/mir-opt/sroa/structs.flat.ScalarReplacementOfAggregates.diff +++ b/tests/mir-opt/sroa/structs.flat.ScalarReplacementOfAggregates.diff @@ -2,23 +2,23 @@ + // MIR for `flat` after ScalarReplacementOfAggregates fn flat() -> () { - let mut _0: (); // return place in scope 0 at $DIR/structs.rs:+0:15: +0:15 - let _1: u8; // in scope 0 at $DIR/structs.rs:+1:15: +1:16 - let _2: (); // in scope 0 at $DIR/structs.rs:+1:18: +1:19 - let _3: &str; // in scope 0 at $DIR/structs.rs:+1:21: +1:22 - let _4: std::option::Option<isize>; // in scope 0 at $DIR/structs.rs:+1:24: +1:25 - let mut _5: Foo; // in scope 0 at $DIR/structs.rs:+1:30: +1:70 - let mut _6: (); // in scope 0 at $DIR/structs.rs:+1:45: +1:47 - let mut _7: std::option::Option<isize>; // in scope 0 at $DIR/structs.rs:+1:60: +1:68 -+ let mut _8: u8; // in scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ let mut _9: (); // in scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ let mut _10: &str; // in scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ let mut _11: std::option::Option<isize>; // in scope 0 at $DIR/structs.rs:+1:30: +1:70 + let mut _0: (); + let _1: u8; + let _2: (); + let _3: &str; + let _4: std::option::Option<isize>; + let mut _5: Foo; + let mut _6: (); + let mut _7: std::option::Option<isize>; ++ let mut _8: u8; ++ let mut _9: (); ++ let mut _10: &str; ++ let mut _11: std::option::Option<isize>; scope 1 { - debug a => _1; // in scope 1 at $DIR/structs.rs:+1:15: +1:16 - debug b => _2; // in scope 1 at $DIR/structs.rs:+1:18: +1:19 - debug c => _3; // in scope 1 at $DIR/structs.rs:+1:21: +1:22 - debug d => _4; // in scope 1 at $DIR/structs.rs:+1:24: +1:25 + debug a => _1; + debug b => _2; + debug c => _3; + debug d => _4; scope 2 { scope 3 { scope 4 { @@ -30,51 +30,48 @@ } bb0: { -- StorageLive(_5); // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ StorageLive(_8); // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ StorageLive(_9); // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ StorageLive(_10); // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ StorageLive(_11); // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ nop; // scope 0 at $DIR/structs.rs:+1:30: +1:70 - StorageLive(_6); // scope 0 at $DIR/structs.rs:+1:45: +1:47 - _6 = (); // scope 0 at $DIR/structs.rs:+1:45: +1:47 - StorageLive(_7); // scope 0 at $DIR/structs.rs:+1:60: +1:68 - _7 = Option::<isize>::Some(const -4_isize); // scope 0 at $DIR/structs.rs:+1:60: +1:68 -- _5 = Foo { a: const 5_u8, b: move _6, c: const "a", d: move _7 }; // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ _8 = const 5_u8; // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ _9 = move _6; // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ _10 = const "a"; // scope 0 at $DIR/structs.rs:+1:30: +1:70 - // mir::Constant - // + span: $DIR/structs.rs:53:52: 53:55 - // + literal: Const { ty: &str, val: Value(Slice(..)) } -+ _11 = move _7; // scope 0 at $DIR/structs.rs:+1:30: +1:70 -+ nop; // scope 0 at $DIR/structs.rs:+1:30: +1:70 - StorageDead(_7); // scope 0 at $DIR/structs.rs:+1:69: +1:70 - StorageDead(_6); // scope 0 at $DIR/structs.rs:+1:69: +1:70 - StorageLive(_1); // scope 0 at $DIR/structs.rs:+1:15: +1:16 -- _1 = (_5.0: u8); // scope 0 at $DIR/structs.rs:+1:15: +1:16 -+ _1 = _8; // scope 0 at $DIR/structs.rs:+1:15: +1:16 - StorageLive(_2); // scope 0 at $DIR/structs.rs:+1:18: +1:19 -- _2 = (_5.1: ()); // scope 0 at $DIR/structs.rs:+1:18: +1:19 -+ _2 = _9; // scope 0 at $DIR/structs.rs:+1:18: +1:19 - StorageLive(_3); // scope 0 at $DIR/structs.rs:+1:21: +1:22 -- _3 = (_5.2: &str); // scope 0 at $DIR/structs.rs:+1:21: +1:22 -+ _3 = _10; // scope 0 at $DIR/structs.rs:+1:21: +1:22 - StorageLive(_4); // scope 0 at $DIR/structs.rs:+1:24: +1:25 -- _4 = (_5.3: std::option::Option<isize>); // scope 0 at $DIR/structs.rs:+1:24: +1:25 -- StorageDead(_5); // scope 0 at $DIR/structs.rs:+1:70: +1:71 -+ _4 = _11; // scope 0 at $DIR/structs.rs:+1:24: +1:25 -+ StorageDead(_8); // scope 0 at $DIR/structs.rs:+1:70: +1:71 -+ StorageDead(_9); // scope 0 at $DIR/structs.rs:+1:70: +1:71 -+ StorageDead(_10); // scope 0 at $DIR/structs.rs:+1:70: +1:71 -+ StorageDead(_11); // scope 0 at $DIR/structs.rs:+1:70: +1:71 -+ nop; // scope 0 at $DIR/structs.rs:+1:70: +1:71 - _0 = const (); // scope 0 at $DIR/structs.rs:+0:15: +6:2 - StorageDead(_4); // scope 0 at $DIR/structs.rs:+6:1: +6:2 - StorageDead(_3); // scope 0 at $DIR/structs.rs:+6:1: +6:2 - StorageDead(_2); // scope 0 at $DIR/structs.rs:+6:1: +6:2 - StorageDead(_1); // scope 0 at $DIR/structs.rs:+6:1: +6:2 - return; // scope 0 at $DIR/structs.rs:+6:2: +6:2 +- StorageLive(_5); ++ StorageLive(_8); ++ StorageLive(_9); ++ StorageLive(_10); ++ StorageLive(_11); ++ nop; + StorageLive(_6); + _6 = (); + StorageLive(_7); + _7 = Option::<isize>::Some(const -4_isize); +- _5 = Foo { a: const 5_u8, b: move _6, c: const "a", d: move _7 }; ++ _8 = const 5_u8; ++ _9 = move _6; ++ _10 = const "a"; ++ _11 = move _7; ++ nop; + StorageDead(_7); + StorageDead(_6); + StorageLive(_1); +- _1 = (_5.0: u8); ++ _1 = _8; + StorageLive(_2); +- _2 = (_5.1: ()); ++ _2 = _9; + StorageLive(_3); +- _3 = (_5.2: &str); ++ _3 = _10; + StorageLive(_4); +- _4 = (_5.3: std::option::Option<isize>); +- StorageDead(_5); ++ _4 = _11; ++ StorageDead(_8); ++ StorageDead(_9); ++ StorageDead(_10); ++ StorageDead(_11); ++ nop; + _0 = const (); + StorageDead(_4); + StorageDead(_3); + StorageDead(_2); + StorageDead(_1); + return; } } |