From 6d7ca92bbf1d82905573ed04b015cfebc0f4c965 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 18 Sep 2006 18:27:05 +0000 Subject: [PATCH] Fix an infinite loop building the CFE git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30465 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.34.1