Add ShiftInst::isLogical/ArithmeticShift methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30445 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2006-09-17 19:29:56 +00:00
parent a5b07404f7
commit 2f463865c2
3 changed files with 28 additions and 7 deletions

View File

@@ -1141,6 +1141,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
//===----------------------------------------------------------------------===//