return LT.first * Entry->Cost;
static const CostTblEntry AVX512BWCostTable[] = {
+ { ISD::SHL, MVT::v8i16, 1 }, // vpsllvw
+ { ISD::SRL, MVT::v8i16, 1 }, // vpsrlvw
+ { ISD::SRA, MVT::v8i16, 1 }, // vpsravw
+
+ { ISD::SHL, MVT::v16i16, 1 }, // vpsllvw
+ { ISD::SRL, MVT::v16i16, 1 }, // vpsrlvw
+ { ISD::SRA, MVT::v16i16, 1 }, // vpsravw
+
{ ISD::SHL, MVT::v32i16, 1 }, // vpsllvw
{ ISD::SRL, MVT::v32i16, 1 }, // vpsrlvw
{ ISD::SRA, MVT::v32i16, 1 }, // vpsravw
; SSE41: Found an estimated cost of 14 for instruction: %shift
; AVX: Found an estimated cost of 14 for instruction: %shift
; AVX2: Found an estimated cost of 14 for instruction: %shift
-; AVX512: Found an estimated cost of 14 for instruction: %shift
+; AVX512F: Found an estimated cost of 14 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 2 for instruction: %shift
%shift = ashr <8 x i16> %a, %b
ret <8 x i16> %shift
; SSE41: Found an estimated cost of 28 for instruction: %shift
; AVX: Found an estimated cost of 28 for instruction: %shift
; AVX2: Found an estimated cost of 10 for instruction: %shift
-; AVX512: Found an estimated cost of 10 for instruction: %shift
+; AVX512F: Found an estimated cost of 10 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 4 for instruction: %shift
%shift = ashr <16 x i16> %a, %b
ret <16 x i16> %shift
; SSE41: Found an estimated cost of 14 for instruction: %shift
; AVX: Found an estimated cost of 14 for instruction: %shift
; AVX2: Found an estimated cost of 14 for instruction: %shift
-; AVX512: Found an estimated cost of 14 for instruction: %shift
+; AVX512F: Found an estimated cost of 14 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 2 for instruction: %shift
%shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <8 x i16> %shift
; SSE41: Found an estimated cost of 28 for instruction: %shift
; AVX: Found an estimated cost of 28 for instruction: %shift
; AVX2: Found an estimated cost of 10 for instruction: %shift
-; AVX512: Found an estimated cost of 10 for instruction: %shift
+; AVX512F: Found an estimated cost of 10 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 4 for instruction: %shift
%shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <16 x i16> %shift
; SSE41: Found an estimated cost of 14 for instruction: %shift
; AVX: Found an estimated cost of 14 for instruction: %shift
; AVX2: Found an estimated cost of 14 for instruction: %shift
-; AVX512: Found an estimated cost of 14 for instruction: %shift
+; AVX512F: Found an estimated cost of 14 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <8 x i16> %a, %b
ret <8 x i16> %shift
; SSE41: Found an estimated cost of 28 for instruction: %shift
; AVX: Found an estimated cost of 28 for instruction: %shift
; AVX2: Found an estimated cost of 10 for instruction: %shift
-; AVX512: Found an estimated cost of 10 for instruction: %shift
+; AVX512F: Found an estimated cost of 10 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 4 for instruction: %shift
%shift = lshr <16 x i16> %a, %b
ret <16 x i16> %shift
; SSE41: Found an estimated cost of 14 for instruction: %shift
; AVX: Found an estimated cost of 14 for instruction: %shift
; AVX2: Found an estimated cost of 14 for instruction: %shift
-; AVX512: Found an estimated cost of 14 for instruction: %shift
+; AVX512F: Found an estimated cost of 14 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <8 x i16> %shift
; SSE41: Found an estimated cost of 28 for instruction: %shift
; AVX: Found an estimated cost of 28 for instruction: %shift
; AVX2: Found an estimated cost of 10 for instruction: %shift
-; AVX512: Found an estimated cost of 10 for instruction: %shift
+; AVX512F: Found an estimated cost of 10 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 4 for instruction: %shift
%shift = lshr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <16 x i16> %shift
; SSE41: Found an estimated cost of 14 for instruction: %shift
; AVX: Found an estimated cost of 14 for instruction: %shift
; AVX2: Found an estimated cost of 14 for instruction: %shift
-; AVX512: Found an estimated cost of 14 for instruction: %shift
+; AVX512F: Found an estimated cost of 14 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 1 for instruction: %shift
%shift = shl <8 x i16> %a, %b
ret <8 x i16> %shift
; SSE41: Found an estimated cost of 28 for instruction: %shift
; AVX: Found an estimated cost of 28 for instruction: %shift
; AVX2: Found an estimated cost of 10 for instruction: %shift
-; AVX512: Found an estimated cost of 10 for instruction: %shift
+; AVX512F: Found an estimated cost of 10 for instruction: %shift
+; AVX512BW: Found an estimated cost of 1 for instruction: %shift
; XOP: Found an estimated cost of 2 for instruction: %shift
%shift = shl <16 x i16> %a, %b
ret <16 x i16> %shift