1
Fork 0

Disable "optimization to avoid load of address" in InstCombine

This commit is contained in:
Tomasz Miąsko 2020-10-21 00:00:00 +00:00
parent 19356453cb
commit e200a4a0d2
4 changed files with 8 additions and 3 deletions

View file

@ -119,6 +119,11 @@ impl OptimizationFinder<'b, 'tcx> {
}
fn find_deref_of_address(&mut self, rvalue: &Rvalue<'tcx>, location: Location) -> Option<()> {
// FIXME(#78192): This optimization can result in unsoundness.
if !self.tcx.sess.opts.debugging_opts.unsound_mir_opts {
return None;
}
// Look for the sequence
//
// _2 = &_1;