This hasn't been caught before because it requires noalias or similarly
strong alias analysis to actually reproduce.
Fixes http://llvm.org/PR27952 .
Differential D20944
LICM: Don't sink stores out of loops that may throw. eli.friedman on Jun 2 2016, 7:05 PM. Authored by
Details This hasn't been caught before because it requires noalias or similarly Fixes http://llvm.org/PR27952 .
Diff Detail Event Timeline
|
The assumption here is that stores to allocas much be unobservable after the function unwinds, and I agree with that. However, what if the exception is caught in this function. In that case, such a store might still be observable.
Also, it would be friendlier to call GetUnderlyingObjects and check whether any are not allocas (if we can determine that there are no relevant landingpads?).