Always take advantage of arithmetic identities
This commit is contained in:
parent
574b64a97f
commit
82f0973dd5
4 changed files with 47 additions and 5 deletions
|
@ -655,11 +655,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
return None;
|
||||
}
|
||||
|
||||
if self.tcx.sess.mir_opt_level() >= 4 {
|
||||
self.eval_rvalue_with_identities(rvalue, place)
|
||||
} else {
|
||||
self.use_ecx(|this| this.ecx.eval_rvalue_into_place(rvalue, place))
|
||||
}
|
||||
self.eval_rvalue_with_identities(rvalue, place)
|
||||
}
|
||||
|
||||
// Attempt to use algebraic identities to eliminate constant expressions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue