projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't sink the instruction to before a landingpad instruction.
[oota-llvm.git]
/
lib
/
Transforms
/
InstCombine
/
InstructionCombining.cpp
diff --git
a/lib/Transforms/InstCombine/InstructionCombining.cpp
b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 0a92efe37e9d27f4b08648b356cf1a71656ae5c8..f13733cf05c92b2bce57cf2fd882eaf451b6356f 100644
(file)
--- a/
lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/
lib/Transforms/InstCombine/InstructionCombining.cpp
@@
-1436,7
+1436,7
@@
static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) {
}
BasicBlock::iterator InsertPos = DestBlock->getFirstNonPHI();
-
+ if (isa<LandingPadInst>(InsertPos)) ++InsertPos; // Skip landingpad inst.
I->moveBefore(InsertPos);
++NumSunkInst;
return true;