about summary refs log tree commit diff
path: root/tests/mir-opt/building/match
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2024-06-27 11:26:22 +0200
committerNadrieril <nadrieril+git@gmail.com>2024-06-27 11:26:34 +0200
commit834f043a0878dda17118129e4ac8930d4d00fc6f (patch)
treeef9514da4b5d1bb9bfedec2c60d804d4deb1fd5e /tests/mir-opt/building/match
parent5df6f720579d3dfc1060ff41e9218e8bc2593535 (diff)
downloadrust-834f043a0878dda17118129e4ac8930d4d00fc6f.tar.gz
rust-834f043a0878dda17118129e4ac8930d4d00fc6f.zip
Fix expansion of or-patterns
Diffstat (limited to 'tests/mir-opt/building/match')
-rw-r--r--tests/mir-opt/building/match/simple_match.match_enum.built.after.mir18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/mir-opt/building/match/simple_match.match_enum.built.after.mir b/tests/mir-opt/building/match/simple_match.match_enum.built.after.mir
index b233aa8b8e5..905aa19da70 100644
--- a/tests/mir-opt/building/match/simple_match.match_enum.built.after.mir
+++ b/tests/mir-opt/building/match/simple_match.match_enum.built.after.mir
@@ -4,12 +4,11 @@ fn match_enum(_1: E1) -> bool {
     debug x => _1;
     let mut _0: bool;
     let mut _2: isize;
-    let mut _3: isize;
 
     bb0: {
         PlaceMention(_1);
         _2 = discriminant(_1);
-        switchInt(move _2) -> [0: bb3, 1: bb5, otherwise: bb2];
+        switchInt(move _2) -> [0: bb3, 1: bb5, 2: bb7, otherwise: bb2];
     }
 
     bb1: {
@@ -18,12 +17,11 @@ fn match_enum(_1: E1) -> bool {
     }
 
     bb2: {
-        _3 = discriminant(_1);
-        switchInt(move _3) -> [2: bb8, otherwise: bb1];
+        goto -> bb1;
     }
 
     bb3: {
-        goto -> bb7;
+        goto -> bb9;
     }
 
     bb4: {
@@ -31,7 +29,7 @@ fn match_enum(_1: E1) -> bool {
     }
 
     bb5: {
-        goto -> bb7;
+        goto -> bb9;
     }
 
     bb6: {
@@ -39,16 +37,16 @@ fn match_enum(_1: E1) -> bool {
     }
 
     bb7: {
-        falseEdge -> [real: bb10, imaginary: bb2];
+        _0 = const false;
+        goto -> bb11;
     }
 
     bb8: {
-        _0 = const false;
-        goto -> bb11;
+        goto -> bb2;
     }
 
     bb9: {
-        goto -> bb1;
+        falseEdge -> [real: bb10, imaginary: bb7];
     }
 
     bb10: {