Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index 59be4a4..9dc892e 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -196,7 +196,6 @@
     void visitBinaryOperator(BinaryOperator &B);
     void visitICmpInst(ICmpInst &IC);
     void visitFCmpInst(FCmpInst &FC);
-    void visitShiftInst(ShiftInst &SI);
     void visitExtractElementInst(ExtractElementInst &EI);
     void visitInsertElementInst(InsertElementInst &EI);
     void visitShuffleVectorInst(ShuffleVectorInst &EI);
@@ -713,9 +712,11 @@
   Assert1(B.getOperand(0)->getType() == B.getOperand(1)->getType(),
           "Both operands to a binary operator are not of the same type!", &B);
 
+  switch (B.getOpcode()) {
   // Check that logical operators are only used with integral operands.
-  if (B.getOpcode() == Instruction::And || B.getOpcode() == Instruction::Or ||
-      B.getOpcode() == Instruction::Xor) {
+  case Instruction::And:
+  case Instruction::Or:
+  case Instruction::Xor:
     Assert1(B.getType()->isInteger() ||
             (isa<PackedType>(B.getType()) && 
              cast<PackedType>(B.getType())->getElementType()->isInteger()),
@@ -723,7 +724,16 @@
     Assert1(B.getType() == B.getOperand(0)->getType(),
             "Logical operators must have same type for operands and result!",
             &B);
-  } else {
+    break;
+  case Instruction::Shl:
+  case Instruction::LShr:
+  case Instruction::AShr:
+    Assert1(B.getType()->isInteger(),
+            "Shift must return an integer result!", &B);
+    Assert1(B.getType() == B.getOperand(0)->getType(),
+            "Shift return type must be same as operands!", &B);
+    /* FALL THROUGH */
+  default:
     // Arithmetic operators only work on integer or fp values
     Assert1(B.getType() == B.getOperand(0)->getType(),
             "Arithmetic operators must have same type for operands and result!",
@@ -731,6 +741,7 @@
     Assert1(B.getType()->isInteger() || B.getType()->isFloatingPoint() ||
             isa<PackedType>(B.getType()),
             "Arithmetic operators must have integer, fp, or packed type!", &B);
+    break;
   }
 
   visitInstruction(B);
@@ -760,16 +771,6 @@
   visitInstruction(FC);
 }
 
-void Verifier::visitShiftInst(ShiftInst &SI) {
-  Assert1(SI.getType()->isInteger(),
-          "Shift must return an integer result!", &SI);
-  Assert1(SI.getType() == SI.getOperand(0)->getType(),
-          "Shift return type must be same as first operand!", &SI);
-  Assert1(SI.getOperand(1)->getType() == Type::Int8Ty,
-          "Second operand to shift must be ubyte type!", &SI);
-  visitInstruction(SI);
-}
-
 void Verifier::visitExtractElementInst(ExtractElementInst &EI) {
   Assert1(ExtractElementInst::isValidOperands(EI.getOperand(0),
                                               EI.getOperand(1)),