[llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp
Chris Lattner
sabre at nondot.org
Sun Sep 17 12:30:11 PDT 2006
Changes in directory llvm/lib/VMCore:
Instructions.cpp updated: 1.39 -> 1.40
---
Log message:
Add ShiftInst::isLogical/ArithmeticShift methods.
---
Diffs of the changes: (+11 -0)
Instructions.cpp | 11 +++++++++++
1 files changed, 11 insertions(+)
Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.39 llvm/lib/VMCore/Instructions.cpp:1.40
--- llvm/lib/VMCore/Instructions.cpp:1.39 Wed Jun 21 11:53:47 2006
+++ llvm/lib/VMCore/Instructions.cpp Sun Sep 17 14:29:56 2006
@@ -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
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list