Do not use the type of the RHS constant to determine the type of the operation.
This fails for shifts because the constant is always 8 bits.

llvm-svn: 19508
diff --git a/llvm/lib/Target/X86/X86ISelPattern.cpp b/llvm/lib/Target/X86/X86ISelPattern.cpp
index 35796e9..a796045 100644
--- a/llvm/lib/Target/X86/X86ISelPattern.cpp
+++ b/llvm/lib/Target/X86/X86ISelPattern.cpp
@@ -2271,7 +2271,7 @@
             SDOperand Op0 = Op.getOperand(0);
             SDOperand Op1 = Op.getOperand(1);
             if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Op1)) {
-              switch (CN->getValueType(0)) {
+              switch (Op0.getValueType()) { // Use Op0's type because of shifts.
               default: break;
               case MVT::i1:
               case MVT::i8:  Opc = TabPtr[0]; break;