mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-10 02:38:50 +00:00
don't sink invokes, even if they are readonly. This fixes a
crash on kimwitu++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50901 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33af59d0f0
commit
bfc538c09e
@ -11233,7 +11233,8 @@ static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) {
|
||||
assert(I->hasOneUse() && "Invariants didn't hold!");
|
||||
|
||||
// Cannot move control-flow-involving, volatile loads, vaarg, etc.
|
||||
if (isa<PHINode>(I) || I->mayWriteToMemory()) return false;
|
||||
if (isa<PHINode>(I) || I->mayWriteToMemory() || isa<TerminatorInst>(I))
|
||||
return false;
|
||||
|
||||
// Do not sink alloca instructions out of the entry block.
|
||||
if (isa<AllocaInst>(I) && I->getParent() ==
|
||||
|
Loading…
x
Reference in New Issue
Block a user