Replace some weird usage of UserOp1 introduced in r49492 by a plain if.
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 23 May 2008 16:17:48 +0000 (16:17 +0000)
committerMatthijs Kooijman <matthijs@stdin.nl>
Fri, 23 May 2008 16:17:48 +0000 (16:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51482 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index d7f5ccf788434c9e182b55133a0fe50ba71e1067..2d300dc68fffb9df1622ac12716660fd00475569 100644 (file)
@@ -1096,7 +1096,9 @@ void InstCombiner::ComputeMaskedBits(Value *V, const APInt &Mask,
         Value *L = P->getIncomingValue(i);
         Value *R = P->getIncomingValue(!i);
         User *LU = dyn_cast<User>(L);
-        unsigned Opcode = LU ? getOpcode(LU) : (unsigned)Instruction::UserOp1;
+        if (!LU)
+          continue;
+        unsigned Opcode = getOpcode(LU);
         // Check for operations that have the property that if
         // both their operands have low zero bits, the result
         // will have low zero bits.