]> git.lizzy.rs Git - rust.git/commitdiff
Bless MIR tests that inline functions qualifying for NRVO
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 15 May 2020 21:53:20 +0000 (14:53 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Sun, 17 May 2020 00:15:24 +0000 (17:15 -0700)
src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir
src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir
src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.d.Inline.after.mir

index d6c5220e28f5fee533ec09a4d990ea0f9ecfc39f..2eebf3f0eceb9c9af24ff324230e6e85428e869d 100644 (file)
@@ -8,7 +8,6 @@ fn a(_1: &mut [T]) -> &mut [T] {
     let mut _4: &mut [T];                // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6
     scope 1 {
         debug self => _4;                // in scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
-        let mut _5: &mut [T];            // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
     }
 
     bb0: {
@@ -16,10 +15,7 @@ fn a(_1: &mut [T]) -> &mut [T] {
         StorageLive(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
         StorageLive(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6
         _4 = &mut (*_1);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6
-        StorageLive(_5);                 // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
-        _5 = _4;                         // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
-        _3 = _5;                         // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
-        StorageDead(_5);                 // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
+        _3 = _4;                         // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
         _2 = &mut (*_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
         StorageDead(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:14: 3:15
         _0 = &mut (*_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
index 2270abc288d861ec559e237c7fa9be4226c66644..f9e1699c55dfadd601d3986d65991ad2b5de3337 100644 (file)
@@ -9,7 +9,6 @@ fn b(_1: &mut std::boxed::Box<T>) -> &mut T {
     scope 1 {
         debug self => _4;                // in scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         let mut _5: &mut T;              // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
-        let mut _6: &mut T;              // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
     }
 
     bb0: {
@@ -18,11 +17,8 @@ fn b(_1: &mut std::boxed::Box<T>) -> &mut T {
         StorageLive(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6
         _4 = &mut (*_1);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6
         StorageLive(_5);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        StorageLive(_6);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        _6 = &mut (*(*_4));              // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        _5 = _6;                         // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
+        _5 = &mut (*(*_4));              // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         _3 = _5;                         // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        StorageDead(_6);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         StorageDead(_5);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         _2 = &mut (*_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
         StorageDead(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:14: 8:15
index a929cb1c2fb343c93b086a083ec68dc0b2cb1cac..08bd4784bde18236a0f3cdcaebdddb424ab850d1 100644 (file)
@@ -7,17 +7,13 @@ fn d(_1: &std::boxed::Box<T>) -> &T {
     let mut _3: &std::boxed::Box<T>;     // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6
     scope 1 {
         debug self => _3;                // in scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        let _4: &T;                      // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15
     }
 
     bb0: {
         StorageLive(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15
         StorageLive(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6
         _3 = &(*_1);                     // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6
-        StorageLive(_4);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        _4 = &(*(*_3));                  // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        _2 = _4;                         // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        StorageDead(_4);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
+        _2 = &(*(*_3));                  // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         _0 = &(*_2);                     // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15
         StorageDead(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:14: 18:15
         StorageDead(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:19:1: 19:2