[llvm-commits] CVS: llvm/lib/VMCore/Instruction.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 12 17:19:05 PST 2004


Changes in directory llvm/lib/VMCore:

Instruction.cpp updated: 1.32 -> 1.33

---
Log message:

Implement new Instruction::isRelational method


---
Diffs of the changes:  (+16 -0)

Index: llvm/lib/VMCore/Instruction.cpp
diff -u llvm/lib/VMCore/Instruction.cpp:1.32 llvm/lib/VMCore/Instruction.cpp:1.33
--- llvm/lib/VMCore/Instruction.cpp:1.32	Thu Nov 20 11:45:12 2003
+++ llvm/lib/VMCore/Instruction.cpp	Mon Jan 12 17:18:25 2004
@@ -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.
 ///





More information about the llvm-commits mailing list