Add ShiftInst::isLogical/ArithmeticShift methods.

llvm-svn: 30445
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index c6730e1..393858c 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/lib/VMCore/Instructions.cpp
@@ -1142,6 +1142,17 @@
 
 
 //===----------------------------------------------------------------------===//
+//                               ShiftInst Class
+//===----------------------------------------------------------------------===//
+
+/// isLogicalShift - Return true if this is a logical shift left or a logical
+/// shift right.
+bool ShiftInst::isLogicalShift() const {
+  return getOpcode() == Instruction::Shl || getType()->isUnsigned();
+}
+
+
+//===----------------------------------------------------------------------===//
 //                             SetCondInst Class
 //===----------------------------------------------------------------------===//