mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
The insertion point for the loads is right before the llvm.eh.exception
call. The call may be in the same BB as the landingpad instruction. If that's the case, then inserting the loads after the landingpad inst, but before the extractvalues, causes undefined behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139088 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4553af561
commit
66d1836380
@ -487,7 +487,7 @@ void llvm::UpgradeExceptionHandling(Module *M) {
|
||||
std::pair<Value*,Value*> ExnSelSlots = FnToLPadSlotMap[Parent->getParent()];
|
||||
|
||||
IRBuilder<> Builder(Context);
|
||||
Builder.SetInsertPoint(Parent, Parent->getFirstInsertionPt());
|
||||
Builder.SetInsertPoint(Parent, Exn);
|
||||
LoadInst *LPExn = Builder.CreateLoad(ExnSelSlots.first, "exn.load");
|
||||
LoadInst *LPSel = Builder.CreateLoad(ExnSelSlots.second, "sel.load");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user