Fix an infinite loop building the CFE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-09-18 18:27:05 +00:00
parent 5e14bca4fd
commit 6d7ca92bbf

View File

@ -3988,7 +3988,8 @@ Instruction *InstCombiner::visitSetCondInst(SetCondInst &I) {
// preferable because it allows the C<<Y expression to be hoisted out
// of a loop if Y is invariant and X is not.
if (Shift && Shift->hasOneUse() && CI->isNullValue() &&
I.isEquality() && !Shift->isArithmeticShift()) {
I.isEquality() && !Shift->isArithmeticShift() &&
isa<Instruction>(Shift->getOperand(0))) {
// Compute C << Y.
Value *NS;
if (Shift->getOpcode() == Instruction::Shr) {