diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index c6730e14c5c..393858cd871 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -1142,6 +1142,17 @@ bool BinaryOperator::swapOperands() { //===----------------------------------------------------------------------===// +// 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 //===----------------------------------------------------------------------===// |