Add vector shifts to the IR, patch by Eli Friedman.
[oota-llvm.git] / lib / Transforms / Scalar / InstructionCombining.cpp
index da98d0a0fcb42f6bdafe2a9e63e9d07dfcbbb240..c5f4dea0f0f3bd9ba257d61fdce8ca1397fef56c 100644 (file)
@@ -6368,7 +6368,8 @@ Instruction *InstCombiner::visitAShr(BinaryOperator &I) {
       return ReplaceInstUsesWith(I, CSI);
   
   // See if we can turn a signed shr into an unsigned shr.
-  if (MaskedValueIsZero(Op0, 
+  if (!isa<VectorType>(I.getType()) &&
+      MaskedValueIsZero(Op0,
                       APInt::getSignBit(I.getType()->getPrimitiveSizeInBits())))
     return BinaryOperator::CreateLShr(Op0, I.getOperand(1));