Skip to content

Commit

Permalink
opt-level >= 4
Browse files Browse the repository at this point in the history
  • Loading branch information
shamatar committed Oct 6, 2021
1 parent 4c3465c commit a31518f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_mir_transform/src/normalize_array_len.rs
Expand Up @@ -15,9 +15,9 @@ pub struct NormalizeArrayLen;

impl<'tcx> MirPass<'tcx> for NormalizeArrayLen {
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
// if tcx.sess.mir_opt_level() < 3 {
// return;
// }
if tcx.sess.mir_opt_level() < 4 {
return;
}

// early returns for edge cases of highly unrolled functions
if body.basic_blocks().len() > MAX_NUM_BLOCKS {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/lower_array_len.rs
@@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=3
// compile-flags: -Z mir-opt-level=4

// EMIT_MIR lower_array_len.array_bound.NormalizeArrayLen.diff
// EMIT_MIR lower_array_len.array_bound.SimplifyLocals.diff
Expand Down

0 comments on commit a31518f

Please sign in to comment.