- virtual const char *getOpcodeName() const;
-};
-
-//===----------------------------------------------------------------------===//
-// Classes to represent Binary operators
-//===----------------------------------------------------------------------===//
-//
-// All of these classes are subclasses of the BinaryOperator class...
-//
-
-class GenericBinaryInst : public BinaryOperator {
-public:
- GenericBinaryInst(BinaryOps Opcode, Value *S1, Value *S2,
- const string &Name = "")
- : BinaryOperator(Opcode, S1, S2, Name) {
+ /// getInverseCondition - Static version that you can use without an
+ /// instruction available.
+ ///
+ static BinaryOps getInverseCondition(BinaryOps Opcode);
+
+ /// getSwappedCondition - Return the condition opcode that would be the result
+ /// of exchanging the two operands of the setcc instruction without changing
+ /// the result produced. Thus, seteq->seteq, setle->setge, setlt->setgt, etc.
+ ///
+ BinaryOps getSwappedCondition() const {
+ return getSwappedCondition(getOpcode());