[CostModel][X86] Fix fpext conversion cost for 16 elements (#76278)
The fpext conversion cost for 16 elements should be 4 from Znver4.
This commit is contained in:
parent
eee71ed3f7
commit
4147b72301
@ -2232,6 +2232,7 @@ InstructionCost X86TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
|
||||
static const TypeConversionCostTblEntry AVX512FConversionTbl[] = {
|
||||
{ ISD::FP_EXTEND, MVT::v8f64, MVT::v8f32, 1 },
|
||||
{ ISD::FP_EXTEND, MVT::v8f64, MVT::v16f32, 3 },
|
||||
{ ISD::FP_EXTEND, MVT::v16f64, MVT::v16f32, 4 }, // 2*vcvtps2pd+vextractf64x4
|
||||
{ ISD::FP_ROUND, MVT::v8f32, MVT::v8f64, 1 },
|
||||
|
||||
{ ISD::TRUNCATE, MVT::v2i1, MVT::v2i8, 3 }, // sext+vpslld+vptestmd
|
||||
|
@ -632,7 +632,7 @@ define void @fp_conv(<8 x float> %a, <16 x float>%b, <4 x float> %c) {
|
||||
; AVX512-LABEL: 'fp_conv'
|
||||
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A1 = fpext <4 x float> %c to <4 x double>
|
||||
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A2 = fpext <8 x float> %a to <8 x double>
|
||||
; AVX512-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %A3 = fpext <16 x float> %b to <16 x double>
|
||||
; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %A3 = fpext <16 x float> %b to <16 x double>
|
||||
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A4 = fptrunc <4 x double> undef to <4 x float>
|
||||
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A5 = fptrunc <8 x double> undef to <8 x float>
|
||||
; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
|
Loading…
x
Reference in New Issue
Block a user