From: Chris Lattner Date: Mon, 18 Sep 2006 18:27:05 +0000 (+0000) Subject: Fix an infinite loop building the CFE X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6d7ca92bbf1d82905573ed04b015cfebc0f4c965;p=oota-llvm.git Fix an infinite loop building the CFE git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30465 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index c3d6f1465eb..7a3b97783b2 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3988,7 +3988,8 @@ Instruction *InstCombiner::visitSetCondInst(SetCondInst &I) { // preferable because it allows the C<hasOneUse() && CI->isNullValue() && - I.isEquality() && !Shift->isArithmeticShift()) { + I.isEquality() && !Shift->isArithmeticShift() && + isa(Shift->getOperand(0))) { // Compute C << Y. Value *NS; if (Shift->getOpcode() == Instruction::Shr) {