forked from OSchip/llvm-project
[X86][SSE] Account for cost of extract/insert of v32i8 vector shifts
llvm-svn: 303012
This commit is contained in:
parent
7d186b016a
commit
aa8dffb69b
|
@ -251,9 +251,9 @@ int X86TTIImpl::getArithmeticInstrCost(
|
|||
{ ISD::SRL, MVT::v16i8, 2 }, // psrlw + pand.
|
||||
{ ISD::SRA, MVT::v16i8, 4 }, // psrlw, pand, pxor, psubb.
|
||||
|
||||
{ ISD::SHL, MVT::v32i8, 4 }, // 2*(psllw + pand).
|
||||
{ ISD::SRL, MVT::v32i8, 4 }, // 2*(psrlw + pand).
|
||||
{ ISD::SRA, MVT::v32i8, 8 }, // 2*(psrlw, pand, pxor, psubb).
|
||||
{ ISD::SHL, MVT::v32i8, 4+2 }, // 2*(psllw + pand) + split.
|
||||
{ ISD::SRL, MVT::v32i8, 4+2 }, // 2*(psrlw + pand) + split.
|
||||
{ ISD::SRA, MVT::v32i8, 8+2 }, // 2*(psrlw, pand, pxor, psubb) + split.
|
||||
|
||||
{ ISD::SDIV, MVT::v16i16, 12 }, // pmulhw sequence
|
||||
{ ISD::SDIV, MVT::v8i16, 6 }, // pmulhw sequence
|
||||
|
|
|
@ -637,10 +637,10 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) {
|
|||
; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v32i8':
|
||||
; SSE2: Found an estimated cost of 8 for instruction: %shift
|
||||
; SSE41: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 10 for instruction: %shift
|
||||
; AVX2: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX512: Found an estimated cost of 4 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 8 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 10 for instruction: %shift
|
||||
; XOPAVX2: Found an estimated cost of 4 for instruction: %shift
|
||||
%shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
|
||||
ret <32 x i8> %shift
|
||||
|
@ -650,11 +650,11 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) {
|
|||
; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v64i8':
|
||||
; SSE2: Found an estimated cost of 16 for instruction: %shift
|
||||
; SSE41: Found an estimated cost of 16 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 16 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 20 for instruction: %shift
|
||||
; AVX2: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX512F: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX512BW: Found an estimated cost of 4 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 16 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 20 for instruction: %shift
|
||||
; XOPAVX2: Found an estimated cost of 8 for instruction: %shift
|
||||
%shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
|
||||
ret <64 x i8> %shift
|
||||
|
|
|
@ -644,10 +644,10 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) {
|
|||
; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v32i8':
|
||||
; SSE2: Found an estimated cost of 4 for instruction: %shift
|
||||
; SSE41: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 6 for instruction: %shift
|
||||
; AVX2: Found an estimated cost of 2 for instruction: %shift
|
||||
; AVX512: Found an estimated cost of 2 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 4 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 6 for instruction: %shift
|
||||
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
|
||||
%shift = lshr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
|
||||
ret <32 x i8> %shift
|
||||
|
@ -657,11 +657,11 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) {
|
|||
; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v64i8':
|
||||
; SSE2: Found an estimated cost of 8 for instruction: %shift
|
||||
; SSE41: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 12 for instruction: %shift
|
||||
; AVX2: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX512F: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX512BW: Found an estimated cost of 2 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 8 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 12 for instruction: %shift
|
||||
; XOPAVX2: Found an estimated cost of 4 for instruction: %shift
|
||||
%shift = lshr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
|
||||
ret <64 x i8> %shift
|
||||
|
|
|
@ -647,10 +647,10 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) {
|
|||
; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v32i8':
|
||||
; SSE2: Found an estimated cost of 4 for instruction: %shift
|
||||
; SSE41: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 6 for instruction: %shift
|
||||
; AVX2: Found an estimated cost of 2 for instruction: %shift
|
||||
; AVX512: Found an estimated cost of 2 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 4 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 6 for instruction: %shift
|
||||
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
|
||||
%shift = shl <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
|
||||
ret <32 x i8> %shift
|
||||
|
@ -660,11 +660,11 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) {
|
|||
; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v64i8':
|
||||
; SSE2: Found an estimated cost of 8 for instruction: %shift
|
||||
; SSE41: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 8 for instruction: %shift
|
||||
; AVX: Found an estimated cost of 12 for instruction: %shift
|
||||
; AVX2: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX512F: Found an estimated cost of 4 for instruction: %shift
|
||||
; AVX512BW: Found an estimated cost of 2 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 8 for instruction: %shift
|
||||
; XOPAVX: Found an estimated cost of 12 for instruction: %shift
|
||||
; XOPAVX2: Found an estimated cost of 4 for instruction: %shift
|
||||
%shift = shl <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
|
||||
ret <64 x i8> %shift
|
||||
|
|
Loading…
Reference in New Issue