Implement new Instruction::isRelational method
llvm-svn: 10810
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp
index 2e22bc3..6f2480b 100644
--- a/llvm/lib/VMCore/Instruction.cpp
+++ b/llvm/lib/VMCore/Instruction.cpp
@@ -148,6 +148,22 @@
}
}
+/// isRelational - Return true if the instruction is a Set* instruction:
+///
+bool Instruction::isRelational(unsigned op) {
+ switch (op) {
+ case SetEQ:
+ case SetNE:
+ case SetLT:
+ case SetGT:
+ case SetLE:
+ case SetGE:
+ return true;
+ }
+ return false;
+}
+
+
/// isTrappingInstruction - Return true if the instruction may trap.
///