]> git.lizzy.rs Git - rust.git/blobdiff - src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir
Show the values and computation that would overflow a const evaluation or propagation
[rust.git] / src / test / mir-opt / match-arm-scopes / rustc.complicated_match.SimplifyCfg-initial.after.mir
index 952aa0e804af95477cc09c5d856843e5271add93..45f7e91d097c042a195c8a14fc021b44beed98a7 100644 (file)
@@ -31,49 +31,53 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 {
 
     bb0: {
         FakeRead(ForMatchedPlace, _2);   // scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16
-        switchInt((_2.0: bool)) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:15
+        switchInt((_2.0: bool)) -> [false: bb2, otherwise: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:15
     }
 
-    bb1: {
-        falseEdges -> [real: bb8, imaginary: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:16:9: 16:22
+    bb1 (cleanup): {
+        resume;                          // scope 0 at $DIR/match-arm-scopes.rs:14:1: 19:2
     }
 
     bb2: {
-        switchInt((_2.1: bool)) -> [false: bb3, otherwise: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:16:29: 16:34
+        falseEdge -> [real: bb9, imaginary: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:16:9: 16:22
     }
 
     bb3: {
-        falseEdges -> [real: bb14, imaginary: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:16:25: 16:38
+        switchInt((_2.1: bool)) -> [false: bb4, otherwise: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:16:29: 16:34
     }
 
     bb4: {
-        switchInt((_2.0: bool)) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:17:10: 17:14
+        falseEdge -> [real: bb18, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:16:25: 16:38
     }
 
     bb5: {
-        falseEdges -> [real: bb22, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:17:9: 17:21
+        switchInt((_2.0: bool)) -> [false: bb7, otherwise: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:17:10: 17:14
     }
 
     bb6: {
+        falseEdge -> [real: bb26, imaginary: bb7]; // scope 0 at $DIR/match-arm-scopes.rs:17:9: 17:21
+    }
+
+    bb7: {
         StorageLive(_15);                // scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33
         _15 = (_2.1: bool);              // scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33
         StorageLive(_16);                // scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36
         _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36
-        goto -> bb21;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
+        goto -> bb25;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
     }
 
-    bb7: {
-        _0 = const 1i32;                 // scope 1 at $DIR/match-arm-scopes.rs:16:77: 16:78
+    bb8: {
+        _0 = const 1_i32;                // scope 1 at $DIR/match-arm-scopes.rs:16:77: 16:78
                                          // ty::Const
                                          // + ty: i32
                                          // + val: Value(Scalar(0x00000001))
                                          // mir::Constant
                                          // + span: $DIR/match-arm-scopes.rs:16:77: 16:78
                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
-        drop(_7) -> [return: bb20, unwind: bb27]; // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
+        drop(_7) -> [return: bb24, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
     }
 
-    bb8: {
+    bb9: {
         StorageLive(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18
         _6 = &(_2.1: bool);              // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18
         StorageLive(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21
@@ -84,21 +88,21 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 {
         StorageLive(_10);                // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49
         _10 = _1;                        // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49
         FakeRead(ForMatchedPlace, _10);  // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49
-        switchInt(_10) -> [false: bb10, otherwise: bb9]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+        switchInt(_10) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb9: {
-        falseEdges -> [real: bb11, imaginary: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+    bb10: {
+        falseEdge -> [real: bb12, imaginary: bb11]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb10: {
+    bb11: {
         _9 = (*_6);                      // scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71
         StorageDead(_10);                // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
-        switchInt(move _9) -> [false: bb13, otherwise: bb12]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+        switchInt(move _9) -> [false: bb17, otherwise: bb16]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb11: {
-        _0 = const 3i32;                 // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60
+    bb12: {
+        _0 = const 3_i32;                // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60
                                          // ty::Const
                                          // + ty: i32
                                          // + val: Value(Scalar(0x00000003))
@@ -107,10 +111,24 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 {
                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
         StorageDead(_10);                // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
         StorageDead(_9);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
-        goto -> bb25;                    // scope 0 at $DIR/match-arm-scopes.rs:1:1: 1:1
+        StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
+        StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
+        goto -> bb15;                    // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60
     }
 
-    bb12: {
+    bb13: {
+        return;                          // scope 0 at $DIR/match-arm-scopes.rs:19:2: 19:2
+    }
+
+    bb14 (cleanup): {
+        drop(_2) -> bb1;                 // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2
+    }
+
+    bb15: {
+        drop(_2) -> [return: bb13, unwind: bb1]; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2
+    }
+
+    bb16: {
         StorageDead(_9);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         FakeRead(ForMatchGuard, _3);     // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
@@ -120,17 +138,17 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 {
         _5 = (_2.1: bool);               // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18
         StorageLive(_7);                 // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21
         _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21
-        goto -> bb7;                     // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
+        goto -> bb8;                     // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
     }
 
-    bb13: {
+    bb17: {
         StorageDead(_9);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
-        falseEdges -> [real: bb2, imaginary: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+        falseEdge -> [real: bb3, imaginary: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb14: {
+    bb18: {
         StorageLive(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27
         _6 = &(_2.0: bool);              // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27
         StorageLive(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37
@@ -141,21 +159,21 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 {
         StorageLive(_13);                // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49
         _13 = _1;                        // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49
         FakeRead(ForMatchedPlace, _13);  // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49
-        switchInt(_13) -> [false: bb16, otherwise: bb15]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+        switchInt(_13) -> [false: bb20, otherwise: bb19]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb15: {
-        falseEdges -> [real: bb17, imaginary: bb16]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+    bb19: {
+        falseEdge -> [real: bb21, imaginary: bb20]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb16: {
+    bb20: {
         _12 = (*_6);                     // scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71
         StorageDead(_13);                // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
-        switchInt(move _12) -> [false: bb19, otherwise: bb18]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+        switchInt(move _12) -> [false: bb23, otherwise: bb22]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb17: {
-        _0 = const 3i32;                 // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60
+    bb21: {
+        _0 = const 3_i32;                // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60
                                          // ty::Const
                                          // + ty: i32
                                          // + val: Value(Scalar(0x00000003))
@@ -164,10 +182,12 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 {
                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
         StorageDead(_13);                // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
         StorageDead(_12);                // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
-        goto -> bb25;                    // scope 0 at $DIR/match-arm-scopes.rs:1:1: 1:1
+        StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
+        StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
+        goto -> bb15;                    // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60
     }
 
-    bb18: {
+    bb22: {
         StorageDead(_12);                // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         FakeRead(ForMatchGuard, _3);     // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73
@@ -177,68 +197,50 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 {
         _5 = (_2.0: bool);               // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27
         StorageLive(_7);                 // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37
         _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37
-        goto -> bb7;                     // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
+        goto -> bb8;                     // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
     }
 
-    bb19: {
+    bb23: {
         StorageDead(_12);                // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
-        falseEdges -> [real: bb4, imaginary: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
+        falseEdge -> [real: bb5, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73
     }
 
-    bb20: {
+    bb24: {
         StorageDead(_7);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         StorageDead(_5);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
         StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
-        goto -> bb24;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
+        goto -> bb28;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
     }
 
-    bb21: {
-        _0 = const 2i32;                 // scope 2 at $DIR/match-arm-scopes.rs:17:41: 17:42
+    bb25: {
+        _0 = const 2_i32;                // scope 2 at $DIR/match-arm-scopes.rs:17:41: 17:42
                                          // ty::Const
                                          // + ty: i32
                                          // + val: Value(Scalar(0x00000002))
                                          // mir::Constant
                                          // + span: $DIR/match-arm-scopes.rs:17:41: 17:42
                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
-        drop(_16) -> [return: bb23, unwind: bb27]; // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43
+        drop(_16) -> [return: bb27, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43
     }
 
-    bb22: {
+    bb26: {
         StorageLive(_15);                // scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17
         _15 = (_2.1: bool);              // scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17
         StorageLive(_16);                // scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20
         _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20
-        goto -> bb21;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
+        goto -> bb25;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
     }
 
-    bb23: {
+    bb27: {
         StorageDead(_16);                // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43
         StorageDead(_15);                // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43
-        goto -> bb24;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
-    }
-
-    bb24: {
-        drop(_2) -> [return: bb26, unwind: bb28]; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2
-    }
-
-    bb25: {
-        StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
-        StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79
-        drop(_2) -> [return: bb26, unwind: bb28]; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2
-    }
-
-    bb26: {
-        return;                          // scope 0 at $DIR/match-arm-scopes.rs:19:2: 19:2
-    }
-
-    bb27 (cleanup): {
-        drop(_2) -> bb28;                // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2
+        goto -> bb28;                    // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6
     }
 
-    bb28 (cleanup): {
-        resume;                          // scope 0 at $DIR/match-arm-scopes.rs:14:1: 19:2
+    bb28: {
+        drop(_2) -> [return: bb13, unwind: bb1]; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2
     }
 }