Hanle i8 returns
[llvm/msp430.git] / lib / Target / PowerPC / PPCPredicates.cpp
blob08a281259e1fa35f6936f18e133c3a44fb5d0af6
1 //===-- PPCPredicates.cpp - PPC Branch Predicate Information --------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the PowerPC branch predicates.
12 //===----------------------------------------------------------------------===//
14 #include "PPCPredicates.h"
15 #include <cassert>
16 using namespace llvm;
18 PPC::Predicate PPC::InvertPredicate(PPC::Predicate Opcode) {
19 switch (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;