]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir/src/transform/unreachable_prop.rs
Rollup merge of #82789 - csmoe:issue-82772, r=estebank
[rust.git] / compiler / rustc_mir / src / transform / unreachable_prop.rs
index e39c8656021b25a245d1dcd667d002a4f5a16302..658c6b6e9db20086855c89e94b73799352195b87 100644 (file)
@@ -12,8 +12,8 @@
 
 impl MirPass<'_> for UnreachablePropagation {
     fn run_pass<'tcx>(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
-        if tcx.sess.opts.debugging_opts.mir_opt_level < 3 {
-            // Enable only under -Zmir-opt-level=3 as in some cases (check the deeply-nested-opt
+        if tcx.sess.mir_opt_level() < 4 {
+            // Enable only under -Zmir-opt-level=4 as in some cases (check the deeply-nested-opt
             // perf benchmark) LLVM may spend quite a lot of time optimizing the generated code.
             return;
         }