Make sure we don't insert instructions before a landingpad instruction.
<rdar://problem/10405911> llvm-svn: 144000
This commit is contained in:
parent
09d3af4c2b
commit
7496461f44
|
@ -97,8 +97,8 @@ AllocaInst* llvm::DemoteRegToStack(Instruction &I, bool VolatileLoads,
|
|||
InsertPt = II.getNormalDest()->begin();
|
||||
}
|
||||
|
||||
for (; isa<PHINode>(InsertPt); ++InsertPt)
|
||||
/* empty */; // Don't insert before any PHI nodes.
|
||||
for (; isa<PHINode>(InsertPt) || isa<LandingPadInst>(InsertPt); ++InsertPt)
|
||||
/* empty */; // Don't insert before any PHI nodes or landingpad instrs.
|
||||
new StoreInst(&I, Slot, InsertPt);
|
||||
|
||||
return Slot;
|
||||
|
|
Loading…
Reference in New Issue