mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 22:50:47 +00:00
Insert stores after phi nodes in the normal dest. This fixes
LowerInvoke/2005-08-03-InvokeWithPHI.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23525 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
52897f827e
commit
93e50ce04c
@ -259,8 +259,11 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo,
|
||||
// Insert a store of the invoke num before the invoke and store zero into the
|
||||
// location afterward.
|
||||
new StoreInst(InvokeNoC, InvokeNum, true, II); // volatile
|
||||
new StoreInst(Constant::getNullValue(Type::UIntTy), InvokeNum, false,
|
||||
II->getNormalDest()->begin()); // nonvolatile.
|
||||
|
||||
BasicBlock::iterator NI = II->getNormalDest()->begin();
|
||||
while (isa<PHINode>(NI)) ++NI;
|
||||
// nonvolatile.
|
||||
new StoreInst(Constant::getNullValue(Type::UIntTy), InvokeNum, false, NI);
|
||||
|
||||
// Add a switch case to our unwind block.
|
||||
CatchSwitch->addCase(InvokeNoC, II->getUnwindDest());
|
||||
|
Loading…
Reference in New Issue
Block a user