From 6456a62178818204e0807aada7b699ab647bebc6 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 15 Aug 2011 22:53:05 +0000 Subject: [PATCH] Don't sink the instruction to before a landingpad instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137672 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index 0a92efe37e9..f13733cf05c 100644 --- 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(InsertPos)) ++InsertPos; // Skip landingpad inst. I->moveBefore(InsertPos); ++NumSunkInst; return true; -- 2.34.1