We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
SimplifyBranchSame
1 parent 20489ea commit dd9b476Copy full SHA for dd9b476
compiler/rustc_mir_transform/src/simplify_try.rs
@@ -544,6 +544,12 @@ pub struct SimplifyBranchSame;
544
545
impl<'tcx> MirPass<'tcx> for SimplifyBranchSame {
546
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
547
+ // This optimization is disabled by default for now due to
548
+ // soundness concerns; see issue #89485 and PR #89489.
549
+ if !tcx.sess.opts.debugging_opts.unsound_mir_opts {
550
+ return;
551
+ }
552
+
553
trace!("Running SimplifyBranchSame on {:?}", body.source);
554
let finder = SimplifyBranchSameOptimizationFinder { body, tcx };
555
let opts = finder.find();
0 commit comments