From a4ee1f516f5af3849672780d136559f8c9aea9b7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 9 May 2008 15:07:33 +0000 Subject: [PATCH] don't sink invokes, even if they are readonly. This fixes a crash on kimwitu++. llvm-svn: 50901 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index e8b60f890c29..f3591879f7bb 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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(I) || I->mayWriteToMemory()) return false; + if (isa(I) || I->mayWriteToMemory() || isa(I)) + return false; // Do not sink alloca instructions out of the entry block. if (isa(I) && I->getParent() == -- GitLab