Fix a type violation
authorChris Lattner <sabre@nondot.org>
Sat, 16 Oct 2004 23:28:04 +0000 (23:28 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 16 Oct 2004 23:28:04 +0000 (23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17069 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 91aebc1efdba52e0c81990461d612b1fad767055..6aef136cf5204981bf5e2f9f1426ba05030a00c0 100644 (file)
@@ -2516,7 +2516,7 @@ Instruction *InstCombiner::visitShiftInst(ShiftInst &I) {
 
   if (isa<UndefValue>(Op0)) {            // undef >>s X -> undef
     if (!isLeftShift && I.getType()->isSigned())
-      return ReplaceInstUsesWith(I, Op1);
+      return ReplaceInstUsesWith(I, Op0);
     else                         // undef << X -> 0   AND  undef >>u X -> 0
       return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType()));
   }