Skip to content

Commit

Permalink
Disable SimplifyBranchSame optimization for now
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianWolff committed Oct 3, 2021
1 parent 20489ea commit dd9b476
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/rustc_mir_transform/src/simplify_try.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,12 @@ pub struct SimplifyBranchSame;

impl<'tcx> MirPass<'tcx> for SimplifyBranchSame {
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
// This optimization is disabled by default for now due to
// soundness concerns; see issue #89485 and PR #89489.
if !tcx.sess.opts.debugging_opts.unsound_mir_opts {
return;
}

trace!("Running SimplifyBranchSame on {:?}", body.source);
let finder = SimplifyBranchSameOptimizationFinder { body, tcx };
let opts = finder.find();
Expand Down

0 comments on commit dd9b476

Please sign in to comment.