Run const propagation at O2

This commit is contained in:
Wesley Wiser 2019-05-08 06:42:41 -04:00
parent b1c4fb2c07
commit 45214edf9e

View File

@ -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);
}
}