diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-09-04 09:02:18 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-09-04 09:02:18 +0000 |
commit | acaad83cd04870a15fbb666e3992f2d5c45e2d0b (patch) | |
tree | bbb652188fef2578fbbfa3baaedff5a21ec2cb26 /llvm/lib/VMCore/AutoUpgrade.cpp | |
parent | b914e3bc5c6a29a782711ee60983fcd38f1cb0ca (diff) | |
download | bcm5719-llvm-acaad83cd04870a15fbb666e3992f2d5c45e2d0b.tar.gz bcm5719-llvm-acaad83cd04870a15fbb666e3992f2d5c45e2d0b.zip |
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
Diffstat (limited to 'llvm/lib/VMCore/AutoUpgrade.cpp')
-rw-r--r-- | llvm/lib/VMCore/AutoUpgrade.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AutoUpgrade.cpp b/llvm/lib/VMCore/AutoUpgrade.cpp index a7f5888ea5d..572018105aa 100644 --- a/llvm/lib/VMCore/AutoUpgrade.cpp +++ b/llvm/lib/VMCore/AutoUpgrade.cpp @@ -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"); |