#ifndef LLVM_LIB_TARGET_POWERPC_MCTARGETDESC_PPCPREDICATES_H
#define LLVM_LIB_TARGET_POWERPC_MCTARGETDESC_PPCPREDICATES_H
#undef PPC
#undef PPC
namespace llvm {
namespace PPC {
    enum Predicate {
    PRED_LT       = (0 << 5) | 12,
    PRED_LE       = (1 << 5) |  4,
    PRED_EQ       = (2 << 5) | 12,
    PRED_GE       = (0 << 5) |  4,
    PRED_GT       = (1 << 5) | 12,
    PRED_NE       = (2 << 5) |  4,
    PRED_UN       = (3 << 5) | 12,
    PRED_NU       = (3 << 5) |  4,
    PRED_LT_MINUS = (0 << 5) | 14,
    PRED_LE_MINUS = (1 << 5) |  6,
    PRED_EQ_MINUS = (2 << 5) | 14,
    PRED_GE_MINUS = (0 << 5) |  6,
    PRED_GT_MINUS = (1 << 5) | 14,
    PRED_NE_MINUS = (2 << 5) |  6,
    PRED_UN_MINUS = (3 << 5) | 14,
    PRED_NU_MINUS = (3 << 5) |  6,
    PRED_LT_PLUS  = (0 << 5) | 15,
    PRED_LE_PLUS  = (1 << 5) |  7,
    PRED_EQ_PLUS  = (2 << 5) | 15,
    PRED_GE_PLUS  = (0 << 5) |  7,
    PRED_GT_PLUS  = (1 << 5) | 15,
    PRED_NE_PLUS  = (2 << 5) |  7,
    PRED_UN_PLUS  = (3 << 5) | 15,
    PRED_NU_PLUS  = (3 << 5) |  7,
        PRED_SPE      = PRED_GT,
            PRED_BIT_SET =   1024,
    PRED_BIT_UNSET = 1025
  };
    enum BranchHintBit {
    BR_NO_HINT       = 0x0,
    BR_NONTAKEN_HINT = 0x2,
    BR_TAKEN_HINT    = 0x3,
    BR_HINT_MASK     = 0X3
  };
    Predicate InvertPredicate(Predicate Opcode);
      Predicate getSwappedPredicate(Predicate Opcode);
    inline unsigned getPredicateCondition(Predicate Opcode) {
    return (unsigned)(Opcode & ~BR_HINT_MASK);
  }
    inline unsigned getPredicateHint(Predicate Opcode) {
    return (unsigned)(Opcode & BR_HINT_MASK);
  }
    inline Predicate getPredicate(unsigned Condition, unsigned Hint) {
    return (Predicate)((Condition & ~BR_HINT_MASK) |
                       (Hint & BR_HINT_MASK));
  }
}
}
#endif