Skip to content

Commit a31518f

Browse files
committed
opt-level >= 4
1 parent 4c3465c commit a31518f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_mir_transform/src/normalize_array_len.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ pub struct NormalizeArrayLen;
1515

1616
impl<'tcx> MirPass<'tcx> for NormalizeArrayLen {
1717
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
18-
// if tcx.sess.mir_opt_level() < 3 {
19-
// return;
20-
// }
18+
if tcx.sess.mir_opt_level() < 4 {
19+
return;
20+
}
2121

2222
// early returns for edge cases of highly unrolled functions
2323
if body.basic_blocks().len() > MAX_NUM_BLOCKS {

src/test/mir-opt/lower_array_len.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=3
1+
// compile-flags: -Z mir-opt-level=4
22

33
// EMIT_MIR lower_array_len.array_bound.NormalizeArrayLen.diff
44
// EMIT_MIR lower_array_len.array_bound.SimplifyLocals.diff

0 commit comments

Comments
 (0)