From e67f5294df55176213d0f1e8db0e8a27fd0155dc Mon Sep 17 00:00:00 2001 From: Nadrieril <nadrieril+git@gmail.com> Date: Wed, 13 Mar 2024 15:04:07 +0100 Subject: [PATCH] Regroup mir-opt tests of match building --- .../deref-patterns/string.foo.PreCodegen.after.mir | 0 .../{ => building/match}/deref-patterns/string.rs | 0 ...onential_or.match_tuple.SimplifyCfg-initial.after.mir | 0 tests/mir-opt/{ => building/match}/exponential_or.rs | 0 .../match_false_edges.full_tested_match.built.after.mir | 0 .../match_false_edges.full_tested_match2.built.after.mir | 0 .../{ => match}/match_false_edges.main.built.after.mir | 0 tests/mir-opt/building/{ => match}/match_false_edges.rs | 0 .../{ => match}/simple_match.match_bool.built.after.mir | 0 tests/mir-opt/building/{ => match}/simple_match.rs | 0 ...idates.disjoint_ranges.SimplifyCfg-initial.after.mir} | 4 ++-- .../{match_test.rs => building/match/sort_candidates.rs} | 9 +++++---- 12 files changed, 7 insertions(+), 6 deletions(-) rename tests/mir-opt/{ => building/match}/deref-patterns/string.foo.PreCodegen.after.mir (100%) rename tests/mir-opt/{ => building/match}/deref-patterns/string.rs (100%) rename tests/mir-opt/{ => building/match}/exponential_or.match_tuple.SimplifyCfg-initial.after.mir (100%) rename tests/mir-opt/{ => building/match}/exponential_or.rs (100%) rename tests/mir-opt/building/{ => match}/match_false_edges.full_tested_match.built.after.mir (100%) rename tests/mir-opt/building/{ => match}/match_false_edges.full_tested_match2.built.after.mir (100%) rename tests/mir-opt/building/{ => match}/match_false_edges.main.built.after.mir (100%) rename tests/mir-opt/building/{ => match}/match_false_edges.rs (100%) rename tests/mir-opt/building/{ => match}/simple_match.match_bool.built.after.mir (100%) rename tests/mir-opt/building/{ => match}/simple_match.rs (100%) rename tests/mir-opt/{match_test.main.SimplifyCfg-initial.after.mir => building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir} (95%) rename tests/mir-opt/{match_test.rs => building/match/sort_candidates.rs} (64%) diff --git a/tests/mir-opt/deref-patterns/string.foo.PreCodegen.after.mir b/tests/mir-opt/building/match/deref-patterns/string.foo.PreCodegen.after.mir similarity index 100% rename from tests/mir-opt/deref-patterns/string.foo.PreCodegen.after.mir rename to tests/mir-opt/building/match/deref-patterns/string.foo.PreCodegen.after.mir diff --git a/tests/mir-opt/deref-patterns/string.rs b/tests/mir-opt/building/match/deref-patterns/string.rs similarity index 100% rename from tests/mir-opt/deref-patterns/string.rs rename to tests/mir-opt/building/match/deref-patterns/string.rs diff --git a/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/tests/mir-opt/building/match/exponential_or.match_tuple.SimplifyCfg-initial.after.mir similarity index 100% rename from tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir rename to tests/mir-opt/building/match/exponential_or.match_tuple.SimplifyCfg-initial.after.mir diff --git a/tests/mir-opt/exponential_or.rs b/tests/mir-opt/building/match/exponential_or.rs similarity index 100% rename from tests/mir-opt/exponential_or.rs rename to tests/mir-opt/building/match/exponential_or.rs diff --git a/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir b/tests/mir-opt/building/match/match_false_edges.full_tested_match.built.after.mir similarity index 100% rename from tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir rename to tests/mir-opt/building/match/match_false_edges.full_tested_match.built.after.mir diff --git a/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir b/tests/mir-opt/building/match/match_false_edges.full_tested_match2.built.after.mir similarity index 100% rename from tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir rename to tests/mir-opt/building/match/match_false_edges.full_tested_match2.built.after.mir diff --git a/tests/mir-opt/building/match_false_edges.main.built.after.mir b/tests/mir-opt/building/match/match_false_edges.main.built.after.mir similarity index 100% rename from tests/mir-opt/building/match_false_edges.main.built.after.mir rename to tests/mir-opt/building/match/match_false_edges.main.built.after.mir diff --git a/tests/mir-opt/building/match_false_edges.rs b/tests/mir-opt/building/match/match_false_edges.rs similarity index 100% rename from tests/mir-opt/building/match_false_edges.rs rename to tests/mir-opt/building/match/match_false_edges.rs diff --git a/tests/mir-opt/building/simple_match.match_bool.built.after.mir b/tests/mir-opt/building/match/simple_match.match_bool.built.after.mir similarity index 100% rename from tests/mir-opt/building/simple_match.match_bool.built.after.mir rename to tests/mir-opt/building/match/simple_match.match_bool.built.after.mir diff --git a/tests/mir-opt/building/simple_match.rs b/tests/mir-opt/building/match/simple_match.rs similarity index 100% rename from tests/mir-opt/building/simple_match.rs rename to tests/mir-opt/building/match/simple_match.rs diff --git a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir similarity index 95% rename from tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir rename to tests/mir-opt/building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir index 107f56f7f69..149c13a8c2f 100644 --- a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir +++ b/tests/mir-opt/building/match/sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir @@ -1,6 +1,6 @@ -// MIR for `main` after SimplifyCfg-initial +// MIR for `disjoint_ranges` after SimplifyCfg-initial -fn main() -> () { +fn disjoint_ranges() -> () { let mut _0: (); let _1: i32; let _3: i32; diff --git a/tests/mir-opt/match_test.rs b/tests/mir-opt/building/match/sort_candidates.rs similarity index 64% rename from tests/mir-opt/match_test.rs rename to tests/mir-opt/building/match/sort_candidates.rs index e465289e427..755e445ed18 100644 --- a/tests/mir-opt/match_test.rs +++ b/tests/mir-opt/building/match/sort_candidates.rs @@ -1,10 +1,9 @@ // skip-filecheck -// Make sure redundant testing paths in `match` expressions are sorted out. - +// Check specific cases of sorting candidates in match lowering. #![feature(exclusive_range_pattern)] -// EMIT_MIR match_test.main.SimplifyCfg-initial.after.mir -fn main() { +// EMIT_MIR sort_candidates.disjoint_ranges.SimplifyCfg-initial.after.mir +fn disjoint_ranges() { let x = 3; let b = true; @@ -17,3 +16,5 @@ fn main() { _ => 3, }; } + +fn main() {}