diff options
author | Tim Northover <tnorthover@apple.com> | 2014-04-30 13:14:03 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-04-30 13:14:03 +0000 |
commit | d805bf8d613aaea5fb1fefd6588043fdf2573634 (patch) | |
tree | 7f537156c0f0d4f8b731f2bdf0e6028cf04eb14f /lib | |
parent | ff56f416a5f0fecc7c996efd1e903fd36afe8bee (diff) | |
download | llvm-d805bf8d613aaea5fb1fefd6588043fdf2573634.tar.gz llvm-d805bf8d613aaea5fb1fefd6588043fdf2573634.tar.bz2 llvm-d805bf8d613aaea5fb1fefd6588043fdf2573634.tar.xz |
AArch64/ARM64: use HS instead of CS & LO instead of CC.
On instructions using the NZCV register, a couple of conditions have dual
representations: HS/CS and LO/CC (meaning unsigned-higher-or-same/carry-set and
unsigned-lower/carry-clear). The first of these is more descriptive in most
circumstances, so we should print it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM64/ARM64FastISel.cpp | 4 | ||||
-rw-r--r-- | lib/Target/ARM64/ARM64ISelLowering.cpp | 12 | ||||
-rw-r--r-- | lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | 8 | ||||
-rw-r--r-- | lib/Target/ARM64/Utils/ARM64BaseInfo.h | 16 |
4 files changed, 20 insertions, 20 deletions
diff --git a/lib/Target/ARM64/ARM64FastISel.cpp b/lib/Target/ARM64/ARM64FastISel.cpp index cadd960b8c..0fce1cc64e 100644 --- a/lib/Target/ARM64/ARM64FastISel.cpp +++ b/lib/Target/ARM64/ARM64FastISel.cpp @@ -737,9 +737,9 @@ static ARM64CC::CondCode getCompareCC(CmpInst::Predicate Pred) { case CmpInst::ICMP_NE: return ARM64CC::NE; case CmpInst::ICMP_UGE: - return ARM64CC::CS; + return ARM64CC::HS; case CmpInst::ICMP_ULT: - return ARM64CC::CC; + return ARM64CC::LO; } } diff --git a/lib/Target/ARM64/ARM64ISelLowering.cpp b/lib/Target/ARM64/ARM64ISelLowering.cpp index 869efcb4d4..029112986e 100644 --- a/lib/Target/ARM64/ARM64ISelLowering.cpp +++ b/lib/Target/ARM64/ARM64ISelLowering.cpp @@ -822,9 +822,9 @@ static ARM64CC::CondCode changeIntCCToARM64CC(ISD::CondCode CC) { case ISD::SETUGT: return ARM64CC::HI; case ISD::SETUGE: - return ARM64CC::CS; + return ARM64CC::HS; case ISD::SETULT: - return ARM64CC::CC; + return ARM64CC::LO; case ISD::SETULE: return ARM64CC::LS; } @@ -1052,7 +1052,7 @@ getARM64XALUOOp(ARM64CC::CondCode &CC, SDValue Op, SelectionDAG &DAG) { break; case ISD::UADDO: Opc = ARM64ISD::ADDS; - CC = ARM64CC::CS; + CC = ARM64CC::HS; break; case ISD::SSUBO: Opc = ARM64ISD::SUBS; @@ -1060,7 +1060,7 @@ getARM64XALUOOp(ARM64CC::CondCode &CC, SDValue Op, SelectionDAG &DAG) { break; case ISD::USUBO: Opc = ARM64ISD::SUBS; - CC = ARM64CC::CC; + CC = ARM64CC::LO; break; // Multiply needs a little bit extra work. case ISD::SMULO: @@ -5553,7 +5553,7 @@ static SDValue EmitVectorComparison(SDValue LHS, SDValue RHS, return DAG.getNode(ARM64ISD::CMGE, dl, VT, RHS, LHS); case ARM64CC::LS: return DAG.getNode(ARM64ISD::CMHS, dl, VT, RHS, LHS); - case ARM64CC::CC: + case ARM64CC::LO: return DAG.getNode(ARM64ISD::CMHI, dl, VT, RHS, LHS); case ARM64CC::LT: if (IsZero) @@ -5561,7 +5561,7 @@ static SDValue EmitVectorComparison(SDValue LHS, SDValue RHS, return DAG.getNode(ARM64ISD::CMGT, dl, VT, RHS, LHS); case ARM64CC::HI: return DAG.getNode(ARM64ISD::CMHI, dl, VT, LHS, RHS); - case ARM64CC::CS: + case ARM64CC::HS: return DAG.getNode(ARM64ISD::CMHS, dl, VT, LHS, RHS); } } diff --git a/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp index cfe9ae08ac..3df5b8b708 100644 --- a/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp +++ b/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp @@ -2221,10 +2221,10 @@ unsigned ARM64AsmParser::parseCondCodeString(StringRef Cond) { unsigned CC = StringSwitch<unsigned>(Cond.lower()) .Case("eq", ARM64CC::EQ) .Case("ne", ARM64CC::NE) - .Case("cs", ARM64CC::CS) - .Case("hs", ARM64CC::CS) - .Case("cc", ARM64CC::CC) - .Case("lo", ARM64CC::CC) + .Case("cs", ARM64CC::HS) + .Case("hs", ARM64CC::HS) + .Case("cc", ARM64CC::LO) + .Case("lo", ARM64CC::LO) .Case("mi", ARM64CC::MI) .Case("pl", ARM64CC::PL) .Case("vs", ARM64CC::VS) diff --git a/lib/Target/ARM64/Utils/ARM64BaseInfo.h b/lib/Target/ARM64/Utils/ARM64BaseInfo.h index 66c2052e62..ef4caefab9 100644 --- a/lib/Target/ARM64/Utils/ARM64BaseInfo.h +++ b/lib/Target/ARM64/Utils/ARM64BaseInfo.h @@ -192,8 +192,8 @@ namespace ARM64CC { enum CondCode { // Meaning (integer) Meaning (floating-point) EQ = 0x0, // Equal Equal NE = 0x1, // Not equal Not equal, or unordered - CS = 0x2, // Carry set >, ==, or unordered - CC = 0x3, // Carry clear Less than + HS = 0x2, // Unsigned higher or same >, ==, or unordered + LO = 0x3, // Unsigned lower Less than MI = 0x4, // Minus, negative Less than PL = 0x5, // Plus, positive or zero >, ==, or unordered VS = 0x6, // Overflow Unordered @@ -215,8 +215,8 @@ inline static const char *getCondCodeName(CondCode Code) { default: llvm_unreachable("Unknown condition code"); case EQ: return "eq"; case NE: return "ne"; - case CS: return "cs"; - case CC: return "cc"; + case HS: return "hs"; + case LO: return "lo"; case MI: return "mi"; case PL: return "pl"; case VS: return "vs"; @@ -237,8 +237,8 @@ inline static CondCode getInvertedCondCode(CondCode Code) { default: llvm_unreachable("Unknown condition code"); case EQ: return NE; case NE: return EQ; - case CS: return CC; - case CC: return CS; + case HS: return LO; + case LO: return HS; case MI: return PL; case PL: return MI; case VS: return VC; @@ -263,8 +263,8 @@ inline static unsigned getNZCVToSatisfyCondCode(CondCode Code) { default: llvm_unreachable("Unknown condition code"); case EQ: return Z; // Z == 1 case NE: return 0; // Z == 0 - case CS: return C; // C == 1 - case CC: return 0; // C == 0 + case HS: return C; // C == 1 + case LO: return 0; // C == 0 case MI: return N; // N == 1 case PL: return 0; // N == 0 case VS: return V; // V == 1 |