Fix the compile failures from last night.
authorChris Lattner <sabre@nondot.org>
Tue, 26 Apr 2005 14:40:41 +0000 (14:40 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 26 Apr 2005 14:40:41 +0000 (14:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21565 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 83d390d4aea999fac1162f3ab1315918921ee494..c901b1a45e833fed7d3e8ae402910f4d49023d6b 100644 (file)
@@ -2281,6 +2281,8 @@ Instruction *InstCombiner::FoldGEPSetCC(User *GEPLHS, Value *RHS,
     // compare the base pointer.
     if (PtrBase != GEPRHS->getOperand(0)) {
       bool IndicesTheSame = GEPLHS->getNumOperands()==GEPRHS->getNumOperands();
+      IndicesTheSame &= GEPLHS->getOperand(0)->getType() == 
+                        GEPRHS->getOperand(0)->getType();
       if (IndicesTheSame)
         for (unsigned i = 1, e = GEPLHS->getNumOperands(); i != e; ++i)
           if (GEPLHS->getOperand(i) != GEPRHS->getOperand(i)) {