about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-19 21:15:31 +0000
committerbors <bors@rust-lang.org>2023-12-19 21:15:31 +0000
commitf704f3b93b1543cf504ecca0052f9f8531b1f61f (patch)
treecd3c3b656272a98f0f73769fa7ec1b2a63a8d906 /tests
parent57ad5058d643d06c0e76bb85442ff9244d966f34 (diff)
parent31bad13f82a774fa0ad3c8df350a4884cfe07e74 (diff)
downloadrust-f704f3b93b1543cf504ecca0052f9f8531b1f61f.tar.gz
rust-f704f3b93b1543cf504ecca0052f9f8531b1f61f.zip
Auto merge of #119112 - Nadrieril:remove-target_blocks-hack, r=matthewjasper
match lowering: Remove the `make_target_blocks` hack

This hack was introduced 4 years ago in [`a1d0266` (#60730)](https://github.com/rust-lang/rust/pull/60730/commits/a1d0266878793bc8b2bf50958eb529005ed19da0) to improve LLVM optimization time, specifically noticed in the `encoding` benchmark. Measurements today indicate it is no longer needed.

r? `@matthewjasper`
Diffstat (limited to 'tests')
-rw-r--r--tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir14
-rw-r--r--tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir28
2 files changed, 21 insertions, 21 deletions
diff --git a/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
index b04e09e88b8..596dcef85fd 100644
--- a/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
@@ -38,22 +38,22 @@ fn match_tuple(_1: (u32, bool, Option<i32>, u32)) -> u32 {
 
     bb4: {
         _5 = Le(const 6_u32, (_1.3: u32));
-        switchInt(move _5) -> [0: bb6, otherwise: bb5];
+        switchInt(move _5) -> [0: bb5, otherwise: bb7];
     }
 
     bb5: {
-        _6 = Le((_1.3: u32), const 9_u32);
-        switchInt(move _6) -> [0: bb6, otherwise: bb8];
+        _3 = Le(const 13_u32, (_1.3: u32));
+        switchInt(move _3) -> [0: bb1, otherwise: bb6];
     }
 
     bb6: {
-        _3 = Le(const 13_u32, (_1.3: u32));
-        switchInt(move _3) -> [0: bb1, otherwise: bb7];
+        _4 = Le((_1.3: u32), const 16_u32);
+        switchInt(move _4) -> [0: bb1, otherwise: bb8];
     }
 
     bb7: {
-        _4 = Le((_1.3: u32), const 16_u32);
-        switchInt(move _4) -> [0: bb1, otherwise: bb8];
+        _6 = Le((_1.3: u32), const 9_u32);
+        switchInt(move _6) -> [0: bb5, otherwise: bb8];
     }
 
     bb8: {
diff --git a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
index ebb2f70a475..5bf78b6150f 100644
--- a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
@@ -28,43 +28,43 @@ fn main() -> () {
         StorageLive(_3);
         PlaceMention(_1);
         _6 = Le(const 0_i32, _1);
-        switchInt(move _6) -> [0: bb4, otherwise: bb1];
+        switchInt(move _6) -> [0: bb3, otherwise: bb8];
     }
 
     bb1: {
-        _7 = Lt(_1, const 10_i32);
-        switchInt(move _7) -> [0: bb4, otherwise: bb2];
+        falseEdge -> [real: bb9, imaginary: bb4];
     }
 
     bb2: {
-        falseEdge -> [real: bb9, imaginary: bb6];
+        _3 = const 3_i32;
+        goto -> bb14;
     }
 
     bb3: {
-        _3 = const 3_i32;
-        goto -> bb14;
+        _4 = Le(const 10_i32, _1);
+        switchInt(move _4) -> [0: bb5, otherwise: bb7];
     }
 
     bb4: {
-        _4 = Le(const 10_i32, _1);
-        switchInt(move _4) -> [0: bb7, otherwise: bb5];
+        falseEdge -> [real: bb12, imaginary: bb6];
     }
 
     bb5: {
-        _5 = Le(_1, const 20_i32);
-        switchInt(move _5) -> [0: bb7, otherwise: bb6];
+        switchInt(_1) -> [4294967295: bb6, otherwise: bb2];
     }
 
     bb6: {
-        falseEdge -> [real: bb12, imaginary: bb8];
+        falseEdge -> [real: bb13, imaginary: bb2];
     }
 
     bb7: {
-        switchInt(_1) -> [4294967295: bb8, otherwise: bb3];
+        _5 = Le(_1, const 20_i32);
+        switchInt(move _5) -> [0: bb5, otherwise: bb4];
     }
 
     bb8: {
-        falseEdge -> [real: bb13, imaginary: bb3];
+        _7 = Lt(_1, const 10_i32);
+        switchInt(move _7) -> [0: bb3, otherwise: bb1];
     }
 
     bb9: {
@@ -83,7 +83,7 @@ fn main() -> () {
 
     bb11: {
         StorageDead(_9);
-        falseEdge -> [real: bb3, imaginary: bb6];
+        falseEdge -> [real: bb2, imaginary: bb4];
     }
 
     bb12: {