mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 04:09:04 +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. llvm-svn: 139088
This commit is contained in:
parent
b98ae4dc68
commit
dbea8de893
@ -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…
x
Reference in New Issue
Block a user