mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[TTI][X86] Reordered getCmpSelInstrCost cost tables in descending ISA order. NFCI.
Minor tidyup to make it clearer whats going on before adding additional costs. llvm-svn: 351683
This commit is contained in:
parent
c8b9cc6e56
commit
41ffe33de4
@ -1650,17 +1650,23 @@ int X86TTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy,
|
||||
int ISD = TLI->InstructionOpcodeToISD(Opcode);
|
||||
assert(ISD && "Invalid opcode");
|
||||
|
||||
static const CostTblEntry SSE2CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v2i64, 8 },
|
||||
{ ISD::SETCC, MVT::v4i32, 1 },
|
||||
{ ISD::SETCC, MVT::v8i16, 1 },
|
||||
{ ISD::SETCC, MVT::v16i8, 1 },
|
||||
static const CostTblEntry AVX512BWCostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v32i16, 1 },
|
||||
{ ISD::SETCC, MVT::v64i8, 1 },
|
||||
};
|
||||
|
||||
static const CostTblEntry SSE42CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v2f64, 1 },
|
||||
{ ISD::SETCC, MVT::v4f32, 1 },
|
||||
{ ISD::SETCC, MVT::v2i64, 1 },
|
||||
static const CostTblEntry AVX512CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v8i64, 1 },
|
||||
{ ISD::SETCC, MVT::v16i32, 1 },
|
||||
{ ISD::SETCC, MVT::v8f64, 1 },
|
||||
{ ISD::SETCC, MVT::v16f32, 1 },
|
||||
};
|
||||
|
||||
static const CostTblEntry AVX2CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v4i64, 1 },
|
||||
{ ISD::SETCC, MVT::v8i32, 1 },
|
||||
{ ISD::SETCC, MVT::v16i16, 1 },
|
||||
{ ISD::SETCC, MVT::v32i8, 1 },
|
||||
};
|
||||
|
||||
static const CostTblEntry AVX1CostTbl[] = {
|
||||
@ -1673,23 +1679,17 @@ int X86TTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy,
|
||||
{ ISD::SETCC, MVT::v32i8, 4 },
|
||||
};
|
||||
|
||||
static const CostTblEntry AVX2CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v4i64, 1 },
|
||||
{ ISD::SETCC, MVT::v8i32, 1 },
|
||||
{ ISD::SETCC, MVT::v16i16, 1 },
|
||||
{ ISD::SETCC, MVT::v32i8, 1 },
|
||||
static const CostTblEntry SSE42CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v2f64, 1 },
|
||||
{ ISD::SETCC, MVT::v4f32, 1 },
|
||||
{ ISD::SETCC, MVT::v2i64, 1 },
|
||||
};
|
||||
|
||||
static const CostTblEntry AVX512CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v8i64, 1 },
|
||||
{ ISD::SETCC, MVT::v16i32, 1 },
|
||||
{ ISD::SETCC, MVT::v8f64, 1 },
|
||||
{ ISD::SETCC, MVT::v16f32, 1 },
|
||||
};
|
||||
|
||||
static const CostTblEntry AVX512BWCostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v32i16, 1 },
|
||||
{ ISD::SETCC, MVT::v64i8, 1 },
|
||||
static const CostTblEntry SSE2CostTbl[] = {
|
||||
{ ISD::SETCC, MVT::v2i64, 8 },
|
||||
{ ISD::SETCC, MVT::v4i32, 1 },
|
||||
{ ISD::SETCC, MVT::v8i16, 1 },
|
||||
{ ISD::SETCC, MVT::v16i8, 1 },
|
||||
};
|
||||
|
||||
if (ST->hasBWI())
|
||||
|
Loading…
Reference in New Issue
Block a user