mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
don't sink invokes, even if they are readonly. This fixes a
crash on kimwitu++. llvm-svn: 50901
This commit is contained in:
parent
dd33da4795
commit
b6db834a47
@ -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…
Reference in New Issue
Block a user