Skip to content

Commit

Permalink
Run const propagation at O2
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed May 15, 2019
1 parent b1c4fb2 commit 45214ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/const_prop.rs
Expand Up @@ -639,7 +639,7 @@ impl<'b, 'a, 'tcx> MutVisitor<'tcx> for ConstPropagator<'b, 'a, 'tcx> {
assert!(self.places[local].is_none());
self.places[local] = Some(value);

if self.tcx.sess.opts.debugging_opts.mir_opt_level >= 3 {
if self.tcx.sess.opts.debugging_opts.mir_opt_level >= 2 {
self.replace_with_const(rval, value, statement.source_info.span);
}
}
Expand Down

0 comments on commit 45214ed

Please sign in to comment.