about summary refs log tree commit diff
path: root/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff')
-rw-r--r--tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff82
1 files changed, 43 insertions, 39 deletions
diff --git a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
index a12db0a730c..e7280f14837 100644
--- a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
+++ b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
@@ -4,92 +4,96 @@
   fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
       debug x => _1;
       let mut _0: std::result::Result<i32, i32>;
-      let mut _2: i32;
-      let mut _3: std::ops::ControlFlow<std::result::Result<std::convert::Infallible, i32>, i32>;
-      let mut _4: std::result::Result<i32, i32>;
-      let mut _5: isize;
-      let _6: std::result::Result<std::convert::Infallible, i32>;
-      let mut _7: std::result::Result<std::convert::Infallible, i32>;
-      let _8: i32;
+      let mut _2: std::ops::ControlFlow<std::result::Result<std::convert::Infallible, i32>, i32>;
+      let mut _3: std::result::Result<i32, i32>;
+      let mut _4: isize;
+      let _5: std::result::Result<std::convert::Infallible, i32>;
+      let mut _6: std::result::Result<std::convert::Infallible, i32>;
+      let _7: i32;
       scope 1 {
-          debug residual => _6;
+          debug residual => _5;
           scope 2 {
               scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) {
                   debug residual => _6;
-                  let _13: i32;
-                  let mut _14: i32;
+                  let _12: i32;
                   scope 9 {
-                      debug e => _13;
+                      debug e => _12;
                       scope 10 (inlined <i32 as From<i32>>::from) {
-                          debug t => _13;
+                          debug t => _12;
                       }
                   }
               }
           }
       }
       scope 3 {
-          debug val => _8;
+          debug val => _7;
           scope 4 {
           }
       }
       scope 5 (inlined <Result<i32, i32> as Try>::branch) {
-          debug self => _1;
-          let mut _9: isize;
+          debug self => _3;
+          let mut _8: isize;
+          let _9: i32;
           let _10: i32;
-          let _11: i32;
-          let mut _12: std::result::Result<std::convert::Infallible, i32>;
+          let mut _11: std::result::Result<std::convert::Infallible, i32>;
           scope 6 {
-              debug v => _10;
+              debug v => _9;
           }
           scope 7 {
-              debug e => _11;
+              debug e => _10;
           }
       }
   
       bb0: {
+          StorageLive(_2);
           StorageLive(_3);
+          _3 = _1;
+          StorageLive(_8);
           StorageLive(_9);
           StorageLive(_10);
-          StorageLive(_11);
-          _9 = discriminant(_1);
-          switchInt(move _9) -> [0: bb5, 1: bb4, otherwise: bb6];
+          _8 = discriminant(_1);
+          switchInt(move _8) -> [0: bb5, 1: bb4, otherwise: bb6];
       }
   
       bb1: {
-          _8 = ((_3 as Continue).0: i32);
-          _0 = Result::<i32, i32>::Ok(_8);
-          StorageDead(_3);
+          _7 = ((_2 as Continue).0: i32);
+          _0 = Result::<i32, i32>::Ok(_7);
+          StorageDead(_2);
           return;
       }
   
       bb2: {
-          _6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
-          _13 = ((_6 as Err).0: i32);
-          _0 = Result::<i32, i32>::Err(move _13);
-          StorageDead(_3);
+          _5 = ((_2 as Break).0: std::result::Result<std::convert::Infallible, i32>);
+          StorageLive(_6);
+          _6 = _5;
+          _12 = move ((_5 as Err).0: i32);
+          _0 = Result::<i32, i32>::Err(_12);
+          StorageDead(_6);
+          StorageDead(_2);
           return;
       }
   
       bb3: {
-          StorageDead(_11);
           StorageDead(_10);
           StorageDead(_9);
-          _5 = discriminant(_3);
-          switchInt(move _5) -> [0: bb1, 1: bb2, otherwise: bb6];
+          StorageDead(_8);
+          StorageDead(_3);
+          _4 = discriminant(_2);
+          switchInt(move _4) -> [0: bb1, 1: bb2, otherwise: bb6];
       }
   
       bb4: {
-          _11 = ((_1 as Err).0: i32);
-          StorageLive(_12);
-          _12 = Result::<Infallible, i32>::Err(move _11);
-          _3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _12);
-          StorageDead(_12);
+          _10 = move ((_1 as Err).0: i32);
+          StorageLive(_11);
+          _11 = Result::<Infallible, i32>::Err(_10);
+          _2 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _11);
+          StorageDead(_11);
           goto -> bb3;
       }
   
       bb5: {
-          _10 = ((_1 as Ok).0: i32);
-          _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _10);
+          _9 = move ((_1 as Ok).0: i32);
+          _2 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(_9);
           goto -> bb3;
       }