diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index c6730e14c5..393858cd87 100644 --- a/lib/VMCore/Instructions.cpp +++ b/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 //===----------------------------------------------------------------------===// |