forked from OSchip/llvm-project
[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
60e5a3accb
commit
bf4b770225
|
@ -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