Re-enable SimplifyToExp in match_branches.

This commit is contained in:
DianQK 2024-07-31 07:58:39 +08:00
parent 8b9d7b1489
commit 1f9d9603c0
No known key found for this signature in database
3 changed files with 1 additions and 6 deletions

View File

@ -44,10 +44,7 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
should_cleanup = true;
continue;
}
// unsound: https://github.com/rust-lang/rust/issues/124150
if tcx.sess.opts.unstable_opts.unsound_mir_opts
&& SimplifyToExp::default().simplify(tcx, body, bb_idx, param_env).is_some()
{
if SimplifyToExp::default().simplify(tcx, body, bb_idx, param_env).is_some() {
should_cleanup = true;
continue;
}

View File

@ -1,5 +1,4 @@
//@ test-mir-pass: MatchBranchSimplification
//@ compile-flags: -Zunsound-mir-opts
#![feature(repr128)]
#![feature(core_intrinsics)]

View File

@ -1,6 +1,5 @@
// skip-filecheck
//@ test-mir-pass: MatchBranchSimplification
//@ compile-flags: -Zunsound-mir-opts
// EMIT_MIR matches_u8.exhaustive_match.MatchBranchSimplification.diff
// EMIT_MIR matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff