Fix a bug in a recent patch. This fixes UnitTests/Vector/Altivec/casts.c on
authorChris Lattner <sabre@nondot.org>
Tue, 6 Jun 2006 22:26:02 +0000 (22:26 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 6 Jun 2006 22:26:02 +0000 (22:26 +0000)
PPC/altivec

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28698 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 3a099af9e98ee74ffbc29bad7e99a46d5f5f0d1c..083acafe3264f9b181a3cd7a6b87a82129dfce79 100644 (file)
@@ -5169,7 +5169,7 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) {
           if (((Tmp = dyn_cast<CastInst>(SVI->getOperand(0))) && 
                Tmp->getOperand(0)->getType() == CI.getType()) ||
               ((Tmp = dyn_cast<CastInst>(SVI->getOperand(1))) && 
-               Tmp->getOperand(1)->getType() == CI.getType())) {
+               Tmp->getOperand(0)->getType() == CI.getType())) {
             Value *LHS = InsertOperandCastBefore(SVI->getOperand(0),
                                                  CI.getType(), &CI);
             Value *RHS = InsertOperandCastBefore(SVI->getOperand(1),