about summary refs log tree commit diff
path: root/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
diff options
context:
space:
mode:
authorSimon Vandel Sillesen <simon.vandel@gmail.com>2020-09-17 19:10:47 +0200
committerSimon Vandel Sillesen <simon.vandel@gmail.com>2020-09-19 15:40:15 +0200
commit738ed9b5ec62259eb0f2aced549feec2f7e7c75a (patch)
tree8157b319e5782d1dcc03c32edb7413e52d99c903 /src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
parentcad050b002ff36c65b68833fcd90824eceee1993 (diff)
downloadrust-738ed9b5ec62259eb0f2aced549feec2f7e7c75a.tar.gz
rust-738ed9b5ec62259eb0f2aced549feec2f7e7c75a.zip
Fix #76803
Check that the variant index matches the target value from the SwitchInt we came from
Diffstat (limited to 'src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff')
-rw-r--r--src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff b/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
index 63139285209..28b8329606c 100644
--- a/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
+++ b/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
@@ -8,22 +8,20 @@
   
       bb0: {
           _2 = discriminant(_1);           // scope 0 at $DIR/76803_regression.rs:12:9: 12:16
--         switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/76803_regression.rs:12:9: 12:16
-+         goto -> bb1;                     // scope 0 at $DIR/76803_regression.rs:12:9: 12:16
+          switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/76803_regression.rs:12:9: 12:16
       }
   
       bb1: {
           _0 = move _1;                    // scope 0 at $DIR/76803_regression.rs:13:14: 13:15
--         goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:11:5: 14:6
-+         goto -> bb2;                     // scope 0 at $DIR/76803_regression.rs:11:5: 14:6
+          goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:11:5: 14:6
       }
   
       bb2: {
--         discriminant(_0) = 1;            // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
--         goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:11:5: 14:6
--     }
-- 
--     bb3: {
+          discriminant(_0) = 1;            // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
+          goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:11:5: 14:6
+      }
+  
+      bb3: {
           return;                          // scope 0 at $DIR/76803_regression.rs:15:2: 15:2
       }
   }