1 //===-- PPCPredicates.cpp - PPC Branch Predicate Information --------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the PowerPC branch predicates.
12 //===----------------------------------------------------------------------===//
14 #include "PPCPredicates.h"
18 PPC::Predicate PPC::InvertPredicate(PPC::Predicate Opcode) {
20 default: assert(0 && "Unknown PPC branch opcode!");
21 case PPC::PRED_EQ: return PPC::PRED_NE;
22 case PPC::PRED_NE: return PPC::PRED_EQ;
23 case PPC::PRED_LT: return PPC::PRED_GE;
24 case PPC::PRED_GE: return PPC::PRED_LT;
25 case PPC::PRED_GT: return PPC::PRED_LE;
26 case PPC::PRED_LE: return PPC::PRED_GT;
27 case PPC::PRED_NU: return PPC::PRED_UN;
28 case PPC::PRED_UN: return PPC::PRED_NU;