Re-enable the early otherwise branch optimization

This commit is contained in:
DianQK 2024-02-21 22:47:12 +08:00
parent f5c256fa0f
commit a334848ba3
No known key found for this signature in database
1 changed files with 1 additions and 2 deletions

View File

@ -92,8 +92,7 @@ pub struct EarlyOtherwiseBranch;
impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
// unsound: https://github.com/rust-lang/rust/issues/95162
sess.mir_opt_level() >= 3 && sess.opts.unstable_opts.unsound_mir_opts
sess.mir_opt_level() >= 2
}
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {