mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Make sure we don't insert instructions before a landingpad instruction.
<rdar://problem/10405911> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3e5d5c53a0
commit
ac101e5848
@ -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
Block a user