From c119828302ff04e715de881ea20ae80608a0e683 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 15 Sep 2022 15:25:52 +0100 Subject: [PATCH] [CostModel][X86] Remove redundant BTVER2 checks from shift costs These all match the default AVX/AVX1 costs so use those instead --- .../Analysis/CostModel/X86/vshift-ashr-codesize.ll | 82 +------- .../CostModel/X86/vshift-ashr-cost-inseltpoison.ll | 194 +------------------ .../Analysis/CostModel/X86/vshift-ashr-cost.ll | 194 +------------------ .../Analysis/CostModel/X86/vshift-ashr-latency.ll | 112 +---------- .../CostModel/X86/vshift-ashr-sizelatency.ll | 82 +------- .../Analysis/CostModel/X86/vshift-lshr-codesize.ll | 82 +------- .../CostModel/X86/vshift-lshr-cost-inseltpoison.ll | 188 +------------------ .../Analysis/CostModel/X86/vshift-lshr-cost.ll | 188 +------------------ .../CostModel/X86/vshift-lshr-sizelatency.ll | 82 +------- .../Analysis/CostModel/X86/vshift-shl-codesize.ll | 104 +---------- .../CostModel/X86/vshift-shl-cost-inseltpoison.ll | 208 +-------------------- .../test/Analysis/CostModel/X86/vshift-shl-cost.ll | 208 +-------------------- .../CostModel/X86/vshift-shl-sizelatency.ll | 108 +---------- 13 files changed, 13 insertions(+), 1819 deletions(-) diff --git a/llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll b/llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll index 2e92fa2..1fdc3d7 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -214,12 +214,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = ashr <4 x i64> %a, %splat @@ -269,12 +263,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = ashr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i64> %a, %splat @@ -361,12 +349,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i32> %a, %splat @@ -416,12 +398,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i32> %a, %splat @@ -508,12 +484,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i16> %a, %splat @@ -569,12 +539,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <32 x i16> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i16> %a, %splat @@ -679,12 +643,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i8> %a, %splat @@ -740,12 +698,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <64 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %shift = ashr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = ashr <64 x i8> %a, %splat @@ -922,10 +874,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, ret <4 x i64> %shift } @@ -959,10 +907,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, ret <8 x i64> %shift } @@ -1005,10 +949,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, ret <8 x i32> %shift } @@ -1042,10 +982,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, ret <16 x i32> %shift } @@ -1092,10 +1028,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, ret <16 x i16> %shift } @@ -1133,10 +1065,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, ret <32 x i16> %shift } @@ -1207,10 +1135,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <32 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, ret <32 x i8> %shift } @@ -1248,10 +1172,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <64 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost-inseltpoison.ll b/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost-inseltpoison.ll index 78d03b54..0836b07 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost-inseltpoison.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost-inseltpoison.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector arithmetic shift right instructions. @@ -43,10 +43,6 @@ define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = ashr <2 x i64> %a, %b ret <2 x i64> %shift } @@ -72,10 +68,6 @@ define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <4 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, %b ret <4 x i64> %shift } @@ -101,10 +93,6 @@ define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <8 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, %b ret <8 x i64> %shift } @@ -130,10 +118,6 @@ define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = ashr <4 x i32> %a, %b ret <4 x i32> %shift } @@ -163,10 +147,6 @@ define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <8 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, %b ret <8 x i32> %shift } @@ -196,10 +176,6 @@ define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, %b ret <16 x i32> %shift } @@ -241,10 +217,6 @@ define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <8 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = ashr <8 x i16> %a, %b ret <8 x i16> %shift } @@ -286,10 +258,6 @@ define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, %b ret <16 x i16> %shift } @@ -331,10 +299,6 @@ define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = ashr <32 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, %b ret <32 x i16> %shift } @@ -376,10 +340,6 @@ define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %shift = ashr <16 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = ashr <16 x i8> %a, %b ret <16 x i8> %shift } @@ -421,10 +381,6 @@ define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = ashr <32 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, %b ret <32 x i8> %shift } @@ -466,10 +422,6 @@ define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <64 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %shift = ashr <64 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, %b ret <64 x i8> %shift } @@ -521,12 +473,6 @@ define <2 x i64> @splatvar_shift_v2i64(<2 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <2 x i64> poison, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <2 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %insert = insertelement <2 x i64> poison, i64 %b, i32 0 %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer %shift = ashr <2 x i64> %a, %splat @@ -576,12 +522,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> poison, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> poison, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer %shift = ashr <4 x i64> %a, %splat @@ -631,12 +571,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> poison, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> poison, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer %shift = ashr <8 x i64> %a, %splat @@ -723,12 +657,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> poison, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> poison, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer %shift = ashr <8 x i32> %a, %splat @@ -778,12 +706,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> poison, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> poison, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer %shift = ashr <16 x i32> %a, %splat @@ -870,12 +792,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> poison, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> poison, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer %shift = ashr <16 x i16> %a, %splat @@ -943,12 +859,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <32 x i16> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> poison, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> poison, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer %shift = ashr <32 x i16> %a, %splat @@ -998,12 +908,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> poison, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer %shift = ashr <16 x i8> %a, %splat @@ -1071,12 +975,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <32 x i8> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> poison, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer %shift = ashr <32 x i8> %a, %splat @@ -1144,12 +1042,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <64 x i8> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = ashr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> poison, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer %shift = ashr <64 x i8> %a, %splat @@ -1181,10 +1073,6 @@ define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = ashr <2 x i64> %a, ret <2 x i64> %shift } @@ -1210,10 +1098,6 @@ define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, ret <4 x i64> %shift } @@ -1239,10 +1123,6 @@ define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, ret <8 x i64> %shift } @@ -1268,10 +1148,6 @@ define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = ashr <4 x i32> %a, ret <4 x i32> %shift } @@ -1301,10 +1177,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, ret <8 x i32> %shift } @@ -1334,10 +1206,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, ret <16 x i32> %shift } @@ -1379,10 +1247,6 @@ define <8 x i16> @constant_shift_v8i16(<8 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <8 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = ashr <8 x i16> %a, ret <8 x i16> %shift } @@ -1424,10 +1288,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, ret <16 x i16> %shift } @@ -1469,10 +1329,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = ashr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, ret <32 x i16> %shift } @@ -1514,10 +1370,6 @@ define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %shift = ashr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = ashr <16 x i8> %a, ret <16 x i8> %shift } @@ -1559,10 +1411,6 @@ define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = ashr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, ret <32 x i8> %shift } @@ -1604,10 +1452,6 @@ define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %shift = ashr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, ret <64 x i8> %shift } @@ -1662,10 +1506,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, ret <4 x i64> %shift } @@ -1695,10 +1535,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, ret <8 x i64> %shift } @@ -1737,10 +1573,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, ret <8 x i32> %shift } @@ -1770,10 +1602,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, ret <16 x i32> %shift } @@ -1824,10 +1652,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, ret <16 x i16> %shift } @@ -1869,10 +1693,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, ret <32 x i16> %shift } @@ -1914,10 +1734,6 @@ define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = ashr <16 x i8> %a, ret <16 x i8> %shift } @@ -1959,10 +1775,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, ret <32 x i8> %shift } @@ -2004,10 +1816,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost.ll b/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost.ll index 6ac9849..484c5e5 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-ashr-cost.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector arithmetic shift right instructions. @@ -43,10 +43,6 @@ define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = ashr <2 x i64> %a, %b ret <2 x i64> %shift } @@ -72,10 +68,6 @@ define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <4 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, %b ret <4 x i64> %shift } @@ -101,10 +93,6 @@ define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <8 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, %b ret <8 x i64> %shift } @@ -130,10 +118,6 @@ define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = ashr <4 x i32> %a, %b ret <4 x i32> %shift } @@ -163,10 +147,6 @@ define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <8 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, %b ret <8 x i32> %shift } @@ -196,10 +176,6 @@ define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, %b ret <16 x i32> %shift } @@ -241,10 +217,6 @@ define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <8 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = ashr <8 x i16> %a, %b ret <8 x i16> %shift } @@ -286,10 +258,6 @@ define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, %b ret <16 x i16> %shift } @@ -331,10 +299,6 @@ define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = ashr <32 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, %b ret <32 x i16> %shift } @@ -376,10 +340,6 @@ define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %shift = ashr <16 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = ashr <16 x i8> %a, %b ret <16 x i8> %shift } @@ -421,10 +381,6 @@ define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = ashr <32 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, %b ret <32 x i8> %shift } @@ -466,10 +422,6 @@ define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <64 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %shift = ashr <64 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, %b ret <64 x i8> %shift } @@ -521,12 +473,6 @@ define <2 x i64> @splatvar_shift_v2i64(<2 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <2 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <2 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %insert = insertelement <2 x i64> undef, i64 %b, i32 0 %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer %shift = ashr <2 x i64> %a, %splat @@ -576,12 +522,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = ashr <4 x i64> %a, %splat @@ -631,12 +571,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i64> %a, %splat @@ -723,12 +657,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i32> %a, %splat @@ -778,12 +706,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i32> %a, %splat @@ -870,12 +792,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i16> %a, %splat @@ -943,12 +859,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <32 x i16> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i16> %a, %splat @@ -998,12 +908,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> undef, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i8> %a, %splat @@ -1071,12 +975,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <32 x i8> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i8> %a, %splat @@ -1144,12 +1042,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <64 x i8> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = ashr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = ashr <64 x i8> %a, %splat @@ -1181,10 +1073,6 @@ define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = ashr <2 x i64> %a, ret <2 x i64> %shift } @@ -1210,10 +1098,6 @@ define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, ret <4 x i64> %shift } @@ -1239,10 +1123,6 @@ define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, ret <8 x i64> %shift } @@ -1268,10 +1148,6 @@ define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = ashr <4 x i32> %a, ret <4 x i32> %shift } @@ -1301,10 +1177,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, ret <8 x i32> %shift } @@ -1334,10 +1206,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, ret <16 x i32> %shift } @@ -1379,10 +1247,6 @@ define <8 x i16> @constant_shift_v8i16(<8 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <8 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = ashr <8 x i16> %a, ret <8 x i16> %shift } @@ -1424,10 +1288,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, ret <16 x i16> %shift } @@ -1469,10 +1329,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = ashr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, ret <32 x i16> %shift } @@ -1514,10 +1370,6 @@ define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %shift = ashr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = ashr <16 x i8> %a, ret <16 x i8> %shift } @@ -1559,10 +1411,6 @@ define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = ashr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, ret <32 x i8> %shift } @@ -1604,10 +1452,6 @@ define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %shift = ashr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, ret <64 x i8> %shift } @@ -1662,10 +1506,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, ret <4 x i64> %shift } @@ -1695,10 +1535,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, ret <8 x i64> %shift } @@ -1737,10 +1573,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, ret <8 x i32> %shift } @@ -1770,10 +1602,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, ret <16 x i32> %shift } @@ -1824,10 +1652,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, ret <16 x i16> %shift } @@ -1869,10 +1693,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, ret <32 x i16> %shift } @@ -1914,10 +1734,6 @@ define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = ashr <16 x i8> %a, ret <16 x i8> %shift } @@ -1959,10 +1775,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, ret <32 x i8> %shift } @@ -2004,10 +1816,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-ashr-latency.ll b/llvm/test/Analysis/CostModel/X86/vshift-ashr-latency.ll index 1f087f9..ff09f4f 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-ashr-latency.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-ashr-latency.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=latency -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=latency -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -214,12 +214,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = ashr <4 x i64> %a, %splat @@ -269,12 +263,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i64> %a, %splat @@ -324,12 +312,6 @@ define <4 x i32> @splatvar_shift_v4i32(<4 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <4 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <4 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift -; %insert = insertelement <4 x i32> undef, i32 %b, i32 0 %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer %shift = ashr <4 x i32> %a, %splat @@ -379,12 +361,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i32> %a, %splat @@ -434,12 +410,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i32> %a, %splat @@ -489,12 +459,6 @@ define <8 x i16> @splatvar_shift_v8i16(<8 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift -; %insert = insertelement <8 x i16> undef, i16 %b, i32 0 %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i16> %a, %splat @@ -544,12 +508,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i16> %a, %splat @@ -605,12 +563,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <32 x i16> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i16> %a, %splat @@ -666,12 +618,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <16 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> undef, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i8> %a, %splat @@ -727,12 +673,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = ashr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i8> %a, %splat @@ -788,12 +728,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <64 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = ashr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = ashr <64 x i8> %a, %splat @@ -970,10 +904,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, ret <4 x i64> %shift } @@ -1007,10 +937,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, ret <8 x i64> %shift } @@ -1044,10 +970,6 @@ define <4 x i32> @splatconstant_shift_v4i32(<4 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <4 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift -; %shift = ashr <4 x i32> %a, ret <4 x i32> %shift } @@ -1081,10 +1003,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, ret <8 x i32> %shift } @@ -1118,10 +1036,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, ret <16 x i32> %shift } @@ -1155,10 +1069,6 @@ define <8 x i16> @splatconstant_shift_v8i16(<8 x i16> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift -; %shift = ashr <8 x i16> %a, ret <8 x i16> %shift } @@ -1196,10 +1106,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, ret <16 x i16> %shift } @@ -1237,10 +1143,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, ret <32 x i16> %shift } @@ -1278,10 +1180,6 @@ define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <16 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift -; %shift = ashr <16 x i8> %a, ret <16 x i8> %shift } @@ -1319,10 +1217,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <32 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, ret <32 x i8> %shift } @@ -1360,10 +1254,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <64 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-ashr-sizelatency.ll b/llvm/test/Analysis/CostModel/X86/vshift-ashr-sizelatency.ll index aa148e6..b0527a7 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-ashr-sizelatency.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-ashr-sizelatency.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -214,12 +214,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = ashr <4 x i64> %a, %splat @@ -269,12 +263,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i64> %a, %splat @@ -361,12 +349,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = ashr <8 x i32> %a, %splat @@ -416,12 +398,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i32> %a, %splat @@ -508,12 +484,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = ashr <16 x i16> %a, %splat @@ -569,12 +539,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <32 x i16> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i16> %a, %splat @@ -679,12 +643,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <32 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %shift = ashr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = ashr <32 x i8> %a, %splat @@ -740,12 +698,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <64 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %shift = ashr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = ashr <64 x i8> %a, %splat @@ -922,10 +874,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %shift = ashr <4 x i64> %a, ret <4 x i64> %shift } @@ -959,10 +907,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %shift = ashr <8 x i64> %a, ret <8 x i64> %shift } @@ -1005,10 +949,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = ashr <8 x i32> %a, ret <8 x i32> %shift } @@ -1042,10 +982,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = ashr <16 x i32> %a, ret <16 x i32> %shift } @@ -1092,10 +1028,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = ashr <16 x i16> %a, ret <16 x i16> %shift } @@ -1133,10 +1065,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = ashr <32 x i16> %a, ret <32 x i16> %shift } @@ -1207,10 +1135,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <32 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %shift = ashr <32 x i8> %a, ret <32 x i8> %shift } @@ -1248,10 +1172,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <64 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %shift = ashr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-lshr-codesize.ll b/llvm/test/Analysis/CostModel/X86/vshift-lshr-codesize.ll index 04d44d5..e0fb198 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-lshr-codesize.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-lshr-codesize.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -214,12 +214,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = lshr <4 x i64> %a, %splat @@ -269,12 +263,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = lshr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = lshr <8 x i64> %a, %splat @@ -361,12 +349,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = lshr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = lshr <8 x i32> %a, %splat @@ -416,12 +398,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = lshr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = lshr <16 x i32> %a, %splat @@ -508,12 +484,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = lshr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = lshr <16 x i16> %a, %splat @@ -569,12 +539,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <32 x i16> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = lshr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = lshr <32 x i16> %a, %splat @@ -667,12 +631,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <32 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = lshr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = lshr <32 x i8> %a, %splat @@ -728,12 +686,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <64 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = lshr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = lshr <64 x i8> %a, %splat @@ -894,10 +846,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, ret <4 x i64> %shift } @@ -931,10 +879,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = lshr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, ret <8 x i64> %shift } @@ -977,10 +921,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, ret <8 x i32> %shift } @@ -1014,10 +954,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = lshr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, ret <16 x i32> %shift } @@ -1064,10 +1000,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, ret <16 x i16> %shift } @@ -1105,10 +1037,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = lshr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, ret <32 x i16> %shift } @@ -1171,10 +1099,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <32 x i8> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, ret <32 x i8> %shift } @@ -1212,10 +1136,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <64 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost-inseltpoison.ll b/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost-inseltpoison.ll index 1adad5e..1875bf7 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost-inseltpoison.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost-inseltpoison.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -47,10 +47,6 @@ define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <2 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <2 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = lshr <2 x i64> %a, %b ret <2 x i64> %shift } @@ -80,10 +76,6 @@ define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, %b ret <4 x i64> %shift } @@ -113,10 +105,6 @@ define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = lshr <8 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, %b ret <8 x i64> %shift } @@ -146,10 +134,6 @@ define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = lshr <4 x i32> %a, %b ret <4 x i32> %shift } @@ -183,10 +167,6 @@ define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <8 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, %b ret <8 x i32> %shift } @@ -220,10 +200,6 @@ define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, %b ret <16 x i32> %shift } @@ -265,10 +241,6 @@ define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = lshr <8 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = lshr <8 x i16> %a, %b ret <8 x i16> %shift } @@ -310,10 +282,6 @@ define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, %b ret <16 x i16> %shift } @@ -355,10 +323,6 @@ define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = lshr <32 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, %b ret <32 x i16> %shift } @@ -400,10 +364,6 @@ define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <16 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = lshr <16 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = lshr <16 x i8> %a, %b ret <16 x i8> %shift } @@ -445,10 +405,6 @@ define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %shift = lshr <32 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, %b ret <32 x i8> %shift } @@ -490,10 +446,6 @@ define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <64 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %shift = lshr <64 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, %b ret <64 x i8> %shift } @@ -582,12 +534,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> poison, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> poison, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer %shift = lshr <4 x i64> %a, %splat @@ -637,12 +583,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> poison, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> poison, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer %shift = lshr <8 x i64> %a, %splat @@ -729,12 +669,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> poison, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> poison, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer %shift = lshr <8 x i32> %a, %splat @@ -784,12 +718,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> poison, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> poison, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer %shift = lshr <16 x i32> %a, %splat @@ -876,12 +804,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> poison, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> poison, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer %shift = lshr <16 x i16> %a, %splat @@ -949,12 +871,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <32 x i16> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> poison, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> poison, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer %shift = lshr <32 x i16> %a, %splat @@ -1004,12 +920,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> poison, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer %shift = lshr <16 x i8> %a, %splat @@ -1059,12 +969,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> poison, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer %shift = lshr <32 x i8> %a, %splat @@ -1132,12 +1036,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <64 x i8> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> poison, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer %shift = lshr <64 x i8> %a, %splat @@ -1169,10 +1067,6 @@ define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = lshr <2 x i64> %a, ret <2 x i64> %shift } @@ -1202,10 +1096,6 @@ define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, ret <4 x i64> %shift } @@ -1235,10 +1125,6 @@ define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = lshr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, ret <8 x i64> %shift } @@ -1268,10 +1154,6 @@ define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = lshr <4 x i32> %a, ret <4 x i32> %shift } @@ -1305,10 +1187,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, ret <8 x i32> %shift } @@ -1342,10 +1220,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, ret <16 x i32> %shift } @@ -1387,10 +1261,6 @@ define <8 x i16> @constant_shift_v8i16(<8 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = lshr <8 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = lshr <8 x i16> %a, ret <8 x i16> %shift } @@ -1432,10 +1302,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, ret <16 x i16> %shift } @@ -1477,10 +1343,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = lshr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, ret <32 x i16> %shift } @@ -1522,10 +1384,6 @@ define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <16 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = lshr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = lshr <16 x i8> %a, ret <16 x i8> %shift } @@ -1567,10 +1425,6 @@ define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %shift = lshr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, ret <32 x i8> %shift } @@ -1612,10 +1466,6 @@ define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %shift = lshr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, ret <64 x i8> %shift } @@ -1658,10 +1508,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, ret <4 x i64> %shift } @@ -1691,10 +1537,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, ret <8 x i64> %shift } @@ -1733,10 +1575,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, ret <8 x i32> %shift } @@ -1766,10 +1604,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, ret <16 x i32> %shift } @@ -1820,10 +1654,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, ret <16 x i16> %shift } @@ -1865,10 +1695,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, ret <32 x i16> %shift } @@ -1894,10 +1720,6 @@ define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i8> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = lshr <16 x i8> %a, ret <16 x i8> %shift } @@ -1939,10 +1761,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, ret <32 x i8> %shift } @@ -1984,10 +1802,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = lshr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost.ll b/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost.ll index a07d505..0ad5519 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-lshr-cost.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -47,10 +47,6 @@ define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <2 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <2 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = lshr <2 x i64> %a, %b ret <2 x i64> %shift } @@ -80,10 +76,6 @@ define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, %b ret <4 x i64> %shift } @@ -113,10 +105,6 @@ define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = lshr <8 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, %b ret <8 x i64> %shift } @@ -146,10 +134,6 @@ define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = lshr <4 x i32> %a, %b ret <4 x i32> %shift } @@ -183,10 +167,6 @@ define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <8 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, %b ret <8 x i32> %shift } @@ -220,10 +200,6 @@ define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, %b ret <16 x i32> %shift } @@ -265,10 +241,6 @@ define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = lshr <8 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = lshr <8 x i16> %a, %b ret <8 x i16> %shift } @@ -310,10 +282,6 @@ define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, %b ret <16 x i16> %shift } @@ -355,10 +323,6 @@ define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = lshr <32 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, %b ret <32 x i16> %shift } @@ -400,10 +364,6 @@ define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <16 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = lshr <16 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = lshr <16 x i8> %a, %b ret <16 x i8> %shift } @@ -445,10 +405,6 @@ define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %shift = lshr <32 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, %b ret <32 x i8> %shift } @@ -490,10 +446,6 @@ define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <64 x i8> %a, %b ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %shift = lshr <64 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, %b ret <64 x i8> %shift } @@ -582,12 +534,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = lshr <4 x i64> %a, %splat @@ -637,12 +583,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = lshr <8 x i64> %a, %splat @@ -729,12 +669,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = lshr <8 x i32> %a, %splat @@ -784,12 +718,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = lshr <16 x i32> %a, %splat @@ -876,12 +804,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = lshr <16 x i16> %a, %splat @@ -949,12 +871,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <32 x i16> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = lshr <32 x i16> %a, %splat @@ -1004,12 +920,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> undef, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer %shift = lshr <16 x i8> %a, %splat @@ -1059,12 +969,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = lshr <32 x i8> %a, %splat @@ -1132,12 +1036,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <64 x i8> %a, %splat ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = lshr <64 x i8> %a, %splat @@ -1169,10 +1067,6 @@ define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = lshr <2 x i64> %a, ret <2 x i64> %shift } @@ -1202,10 +1096,6 @@ define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, ret <4 x i64> %shift } @@ -1235,10 +1125,6 @@ define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = lshr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, ret <8 x i64> %shift } @@ -1268,10 +1154,6 @@ define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = lshr <4 x i32> %a, ret <4 x i32> %shift } @@ -1305,10 +1187,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, ret <8 x i32> %shift } @@ -1342,10 +1220,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, ret <16 x i32> %shift } @@ -1387,10 +1261,6 @@ define <8 x i16> @constant_shift_v8i16(<8 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = lshr <8 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = lshr <8 x i16> %a, ret <8 x i16> %shift } @@ -1432,10 +1302,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, ret <16 x i16> %shift } @@ -1477,10 +1343,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %shift = lshr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, ret <32 x i16> %shift } @@ -1522,10 +1384,6 @@ define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <16 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = lshr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = lshr <16 x i8> %a, ret <16 x i8> %shift } @@ -1567,10 +1425,6 @@ define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %shift = lshr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, ret <32 x i8> %shift } @@ -1612,10 +1466,6 @@ define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %shift = lshr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, ret <64 x i8> %shift } @@ -1658,10 +1508,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, ret <4 x i64> %shift } @@ -1691,10 +1537,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, ret <8 x i64> %shift } @@ -1733,10 +1575,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, ret <8 x i32> %shift } @@ -1766,10 +1604,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, ret <16 x i32> %shift } @@ -1820,10 +1654,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, ret <16 x i16> %shift } @@ -1865,10 +1695,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, ret <32 x i16> %shift } @@ -1894,10 +1720,6 @@ define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i8> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = lshr <16 x i8> %a, ret <16 x i8> %shift } @@ -1939,10 +1761,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = lshr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, ret <32 x i8> %shift } @@ -1984,10 +1802,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = lshr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-lshr-sizelatency.ll b/llvm/test/Analysis/CostModel/X86/vshift-lshr-sizelatency.ll index c92d537..03b66db 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-lshr-sizelatency.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-lshr-sizelatency.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -214,12 +214,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = lshr <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = lshr <4 x i64> %a, %splat @@ -269,12 +263,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = lshr <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = lshr <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = lshr <8 x i64> %a, %splat @@ -361,12 +349,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = lshr <8 x i32> %a, %splat @@ -416,12 +398,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = lshr <16 x i32> %a, %splat @@ -508,12 +484,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = lshr <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = lshr <16 x i16> %a, %splat @@ -569,12 +539,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <32 x i16> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = lshr <32 x i16> %a, %splat @@ -667,12 +631,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = lshr <32 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = lshr <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = lshr <32 x i8> %a, %splat @@ -728,12 +686,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = lshr <64 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = lshr <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = lshr <64 x i8> %a, %splat @@ -894,10 +846,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = lshr <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %shift = lshr <4 x i64> %a, ret <4 x i64> %shift } @@ -931,10 +879,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = lshr <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %shift = lshr <8 x i64> %a, ret <8 x i64> %shift } @@ -977,10 +921,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = lshr <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = lshr <8 x i32> %a, ret <8 x i32> %shift } @@ -1014,10 +954,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = lshr <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = lshr <16 x i32> %a, ret <16 x i32> %shift } @@ -1064,10 +1000,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <16 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = lshr <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = lshr <16 x i16> %a, ret <16 x i16> %shift } @@ -1105,10 +1037,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = lshr <32 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = lshr <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = lshr <32 x i16> %a, ret <32 x i16> %shift } @@ -1175,10 +1103,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <32 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = lshr <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %shift = lshr <32 x i8> %a, ret <32 x i8> %shift } @@ -1216,10 +1140,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = lshr <64 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = lshr <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %shift = lshr <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-shl-codesize.ll b/llvm/test/Analysis/CostModel/X86/vshift-shl-codesize.ll index e21a384..8fbff53b 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-shl-codesize.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-shl-codesize.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=code-size -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -214,12 +214,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = shl <4 x i64> %a, %splat @@ -269,12 +263,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = shl <8 x i64> %a, %splat @@ -361,12 +349,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <8 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = shl <8 x i32> %a, %splat @@ -416,12 +398,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <16 x i32> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = shl <16 x i32> %a, %splat @@ -508,12 +484,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <16 x i16> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = shl <16 x i16> %a, %splat @@ -569,12 +539,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <32 x i16> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = shl <32 x i16> %a, %splat @@ -624,12 +588,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <16 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> undef, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer %shift = shl <16 x i8> %a, %splat @@ -679,12 +637,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <32 x i8> %a, %splat ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = shl <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = shl <32 x i8> %a, %splat @@ -740,12 +692,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <64 x i8> %a, %splat ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = shl <64 x i8> %a, %splat @@ -837,10 +783,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -874,10 +816,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -920,10 +858,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i16> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -957,10 +891,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i16> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -1034,10 +964,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, ret <4 x i64> %shift } @@ -1071,10 +997,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, ret <8 x i64> %shift } @@ -1117,10 +1039,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -1154,10 +1072,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -1204,10 +1118,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -1245,10 +1155,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -1311,10 +1217,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <32 x i8> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = shl <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, ret <32 x i8> %shift } @@ -1352,10 +1254,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <64 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = shl <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, ret <64 x i8> %shift } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-shl-cost-inseltpoison.ll b/llvm/test/Analysis/CostModel/X86/vshift-shl-cost-inseltpoison.ll index b9dfbc0..d1c2c50 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-shl-cost-inseltpoison.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-shl-cost-inseltpoison.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SLM ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector shift left instructions. @@ -43,10 +43,6 @@ define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <2 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <2 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = shl <2 x i64> %a, %b ret <2 x i64> %shift } @@ -76,10 +72,6 @@ define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <4 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, %b ret <4 x i64> %shift } @@ -109,10 +101,6 @@ define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = shl <8 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, %b ret <8 x i64> %shift } @@ -146,10 +134,6 @@ define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <4 x i32> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <4 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = shl <4 x i32> %a, %b ret <4 x i32> %shift } @@ -187,10 +171,6 @@ define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <8 x i32> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = shl <8 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, %b ret <8 x i32> %shift } @@ -228,10 +208,6 @@ define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = shl <16 x i32> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = shl <16 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, %b ret <16 x i32> %shift } @@ -277,10 +253,6 @@ define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = shl <8 x i16> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <8 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = shl <8 x i16> %a, %b ret <8 x i16> %shift } @@ -326,10 +298,6 @@ define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <16 x i16> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = shl <16 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, %b ret <16 x i16> %shift } @@ -375,10 +343,6 @@ define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <32 x i16> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = shl <32 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, %b ret <32 x i16> %shift } @@ -424,10 +388,6 @@ define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = shl <16 x i8> %a, %b ret <16 x i8> %shift } @@ -473,10 +433,6 @@ define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = shl <32 x i8> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <32 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, %b ret <32 x i8> %shift } @@ -522,10 +478,6 @@ define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %shift = shl <64 x i8> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <64 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, %b ret <64 x i8> %shift } @@ -626,12 +578,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <4 x i64> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> poison, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> poison, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer %shift = shl <4 x i64> %a, %splat @@ -687,12 +633,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <8 x i64> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> poison, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> poison, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer %shift = shl <8 x i64> %a, %splat @@ -791,12 +731,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <8 x i32> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> poison, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> poison, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer %shift = shl <8 x i32> %a, %splat @@ -852,12 +786,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <16 x i32> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> poison, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> poison, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer %shift = shl <16 x i32> %a, %splat @@ -956,12 +884,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> poison, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> poison, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer %shift = shl <16 x i16> %a, %splat @@ -1035,12 +957,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> poison, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> poison, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer %shift = shl <32 x i16> %a, %splat @@ -1096,12 +1012,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = shl <16 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> poison, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer %shift = shl <16 x i8> %a, %splat @@ -1157,12 +1067,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = shl <32 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = shl <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> poison, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer %shift = shl <32 x i8> %a, %splat @@ -1236,12 +1140,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %shift = shl <64 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> poison, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = shl <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> poison, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer %shift = shl <64 x i8> %a, %splat @@ -1273,10 +1171,6 @@ define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = shl <2 x i64> %a, ret <2 x i64> %shift } @@ -1306,10 +1200,6 @@ define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, ret <4 x i64> %shift } @@ -1339,10 +1229,6 @@ define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, ret <8 x i64> %shift } @@ -1409,10 +1295,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <8 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -1450,10 +1332,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <16 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -1532,10 +1410,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -1585,10 +1459,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -1634,10 +1504,6 @@ define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = shl <16 x i8> %a, ret <16 x i8> %shift } @@ -1683,10 +1549,6 @@ define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = shl <32 x i8> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, ret <32 x i8> %shift } @@ -1732,10 +1594,6 @@ define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %shift = shl <64 x i8> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, ret <64 x i8> %shift } @@ -1778,10 +1636,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, ret <4 x i64> %shift } @@ -1811,10 +1665,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, ret <8 x i64> %shift } @@ -1853,10 +1703,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -1886,10 +1732,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -1940,10 +1782,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -1985,10 +1823,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -2014,10 +1848,6 @@ define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i8> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = shl <16 x i8> %a, ret <16 x i8> %shift } @@ -2059,10 +1889,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, ret <32 x i8> %shift } @@ -2104,10 +1930,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, ret <64 x i8> %shift } @@ -2266,10 +2088,6 @@ define <2 x i64> @test5(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shl = shl <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shl ; -; BTVER2-LABEL: 'test5' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shl = shl <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shl -; %shl = shl <2 x i64> %a, ret <2 x i64> %shl } @@ -2331,10 +2149,6 @@ define <16 x i16> @test6(<16 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shl = shl <16 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shl ; -; BTVER2-LABEL: 'test6' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shl = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shl -; %shl = shl <16 x i16> %a, ret <16 x i16> %shl } @@ -2376,10 +2190,6 @@ define <8 x i32> @test7(<8 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shl = shl <8 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shl ; -; BTVER2-LABEL: 'test7' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shl = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shl -; %shl = shl <8 x i32> %a, ret <8 x i32> %shl } @@ -2414,10 +2224,6 @@ define <4 x i64> @test8(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shl = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shl ; -; BTVER2-LABEL: 'test8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shl = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shl -; %shl = shl <4 x i64> %a, ret <4 x i64> %shl } @@ -2469,10 +2275,6 @@ define <32 x i16> @test9(<32 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shl = shl <32 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shl ; -; BTVER2-LABEL: 'test9' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shl = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shl -; %shl = shl <32 x i16> %a, ret <32 x i16> %shl } @@ -2512,10 +2314,6 @@ define <16 x i32> @test10(<16 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shl = shl <16 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shl ; -; BTVER2-LABEL: 'test10' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shl = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shl -; %shl = shl <16 x i32> %a, ret <16 x i32> %shl } @@ -2550,10 +2348,6 @@ define <8 x i64> @test11(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shl = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shl ; -; BTVER2-LABEL: 'test11' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shl = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shl -; %shl = shl <8 x i64> %a, ret <8 x i64> %shl } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-shl-cost.ll b/llvm/test/Analysis/CostModel/X86/vshift-shl-cost.ll index 5c72d51..f5e246e 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-shl-cost.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-shl-cost.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SLM ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector shift left instructions. @@ -43,10 +43,6 @@ define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <2 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <2 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = shl <2 x i64> %a, %b ret <2 x i64> %shift } @@ -76,10 +72,6 @@ define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <4 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, %b ret <4 x i64> %shift } @@ -109,10 +101,6 @@ define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, %b ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'var_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = shl <8 x i64> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, %b ret <8 x i64> %shift } @@ -146,10 +134,6 @@ define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <4 x i32> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <4 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %shift -; %shift = shl <4 x i32> %a, %b ret <4 x i32> %shift } @@ -187,10 +171,6 @@ define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <8 x i32> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = shl <8 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, %b ret <8 x i32> %shift } @@ -228,10 +208,6 @@ define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = shl <16 x i32> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'var_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = shl <16 x i32> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, %b ret <16 x i32> %shift } @@ -277,10 +253,6 @@ define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = shl <8 x i16> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v8i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <8 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %shift -; %shift = shl <8 x i16> %a, %b ret <8 x i16> %shift } @@ -326,10 +298,6 @@ define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <16 x i16> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = shl <16 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, %b ret <16 x i16> %shift } @@ -375,10 +343,6 @@ define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <32 x i16> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'var_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = shl <32 x i16> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, %b ret <32 x i16> %shift } @@ -424,10 +388,6 @@ define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = shl <16 x i8> %a, %b ret <16 x i8> %shift } @@ -473,10 +433,6 @@ define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = shl <32 x i8> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <32 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, %b ret <32 x i8> %shift } @@ -522,10 +478,6 @@ define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %shift = shl <64 x i8> %a, %b ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'var_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <64 x i8> %a, %b -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, %b ret <64 x i8> %shift } @@ -626,12 +578,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <4 x i64> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = shl <4 x i64> %a, %splat @@ -687,12 +633,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <8 x i64> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = shl <8 x i64> %a, %splat @@ -791,12 +731,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <8 x i32> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = shl <8 x i32> %a, %splat @@ -852,12 +786,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <16 x i32> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = shl <16 x i32> %a, %splat @@ -956,12 +884,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = shl <16 x i16> %a, %splat @@ -1035,12 +957,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = shl <32 x i16> %a, %splat @@ -1096,12 +1012,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = shl <16 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> undef, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer %shift = shl <16 x i8> %a, %splat @@ -1157,12 +1067,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = shl <32 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = shl <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = shl <32 x i8> %a, %splat @@ -1236,12 +1140,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %shift = shl <64 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = shl <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = shl <64 x i8> %a, %splat @@ -1273,10 +1171,6 @@ define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v2i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shift -; %shift = shl <2 x i64> %a, ret <2 x i64> %shift } @@ -1306,10 +1200,6 @@ define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, ret <4 x i64> %shift } @@ -1339,10 +1229,6 @@ define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, ret <8 x i64> %shift } @@ -1409,10 +1295,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <8 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -1450,10 +1332,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <16 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -1532,10 +1410,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -1585,10 +1459,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -1634,10 +1504,6 @@ define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = shl <16 x i8> %a, ret <16 x i8> %shift } @@ -1683,10 +1549,6 @@ define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = shl <32 x i8> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = shl <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, ret <32 x i8> %shift } @@ -1732,10 +1594,6 @@ define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %shift = shl <64 x i8> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'constant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = shl <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, ret <64 x i8> %shift } @@ -1778,10 +1636,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, ret <4 x i64> %shift } @@ -1811,10 +1665,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, ret <8 x i64> %shift } @@ -1853,10 +1703,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -1886,10 +1732,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -1940,10 +1782,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -1985,10 +1823,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i16> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -2014,10 +1848,6 @@ define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i8> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = shl <16 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %shift -; %shift = shl <16 x i8> %a, ret <16 x i8> %shift } @@ -2059,10 +1889,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, ret <32 x i8> %shift } @@ -2104,10 +1930,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <64 x i8> %a, ; AVX512BWVL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, ret <64 x i8> %shift } @@ -2266,10 +2088,6 @@ define <2 x i64> @test5(<2 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shl = shl <2 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shl ; -; BTVER2-LABEL: 'test5' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shl = shl <2 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %shl -; %shl = shl <2 x i64> %a, ret <2 x i64> %shl } @@ -2331,10 +2149,6 @@ define <16 x i16> @test6(<16 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shl = shl <16 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shl ; -; BTVER2-LABEL: 'test6' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shl = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %shl -; %shl = shl <16 x i16> %a, ret <16 x i16> %shl } @@ -2376,10 +2190,6 @@ define <8 x i32> @test7(<8 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shl = shl <8 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shl ; -; BTVER2-LABEL: 'test7' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shl = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %shl -; %shl = shl <8 x i32> %a, ret <8 x i32> %shl } @@ -2414,10 +2224,6 @@ define <4 x i64> @test8(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shl = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shl ; -; BTVER2-LABEL: 'test8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shl = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %shl -; %shl = shl <4 x i64> %a, ret <4 x i64> %shl } @@ -2469,10 +2275,6 @@ define <32 x i16> @test9(<32 x i16> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shl = shl <32 x i16> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shl ; -; BTVER2-LABEL: 'test9' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shl = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %shl -; %shl = shl <32 x i16> %a, ret <32 x i16> %shl } @@ -2512,10 +2314,6 @@ define <16 x i32> @test10(<16 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shl = shl <16 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shl ; -; BTVER2-LABEL: 'test10' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shl = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %shl -; %shl = shl <16 x i32> %a, ret <16 x i32> %shl } @@ -2550,10 +2348,6 @@ define <8 x i64> @test11(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shl = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shl ; -; BTVER2-LABEL: 'test11' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shl = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %shl -; %shl = shl <8 x i64> %a, ret <8 x i64> %shl } diff --git a/llvm/test/Analysis/CostModel/X86/vshift-shl-sizelatency.ll b/llvm/test/Analysis/CostModel/X86/vshift-shl-sizelatency.ll index a8ef264..9c8ff8d 100644 --- a/llvm/test/Analysis/CostModel/X86/vshift-shl-sizelatency.ll +++ b/llvm/test/Analysis/CostModel/X86/vshift-shl-sizelatency.ll @@ -14,7 +14,7 @@ ; ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE,SLM ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 -; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,BTVER2 +; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=size-latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 ; Verify the cost of vector logical shift right instructions. @@ -226,12 +226,6 @@ define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <4 x i64> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <4 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %insert = insertelement <4 x i64> undef, i64 %b, i32 0 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer %shift = shl <4 x i64> %a, %splat @@ -287,12 +281,6 @@ define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <8 x i64> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = shl <8 x i64> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %insert = insertelement <8 x i64> undef, i64 %b, i32 0 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer %shift = shl <8 x i64> %a, %splat @@ -391,12 +379,6 @@ define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <8 x i32> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = shl <8 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %insert = insertelement <8 x i32> undef, i32 %b, i32 0 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer %shift = shl <8 x i32> %a, %splat @@ -452,12 +434,6 @@ define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <16 x i32> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = shl <16 x i32> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %insert = insertelement <16 x i32> undef, i32 %b, i32 0 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer %shift = shl <16 x i32> %a, %splat @@ -556,12 +532,6 @@ define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = shl <16 x i16> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = shl <16 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %insert = insertelement <16 x i16> undef, i16 %b, i32 0 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer %shift = shl <16 x i16> %a, %splat @@ -623,12 +593,6 @@ define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i16> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = shl <32 x i16> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %insert = insertelement <32 x i16> undef, i16 %b, i32 0 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer %shift = shl <32 x i16> %a, %splat @@ -684,12 +648,6 @@ define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = shl <16 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v16i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <16 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift -; %insert = insertelement <16 x i8> undef, i8 %b, i32 0 %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer %shift = shl <16 x i8> %a, %splat @@ -745,12 +703,6 @@ define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = shl <32 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = shl <32 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %insert = insertelement <32 x i8> undef, i8 %b, i32 0 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer %shift = shl <32 x i8> %a, %splat @@ -812,12 +764,6 @@ define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { ; SLM-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %shift = shl <64 x i8> %a, %splat ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatvar_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 -; BTVER2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer -; BTVER2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = shl <64 x i8> %a, %splat -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %insert = insertelement <64 x i8> undef, i8 %b, i32 0 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer %shift = shl <64 x i8> %a, %splat @@ -888,10 +834,6 @@ define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = shl <4 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v4i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <4 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift -; %shift = shl <4 x i32> %a, ret <4 x i32> %shift } @@ -929,10 +871,6 @@ define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = shl <8 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -970,10 +908,6 @@ define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { ; SLM-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = shl <16 x i32> %a, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -1012,10 +946,6 @@ define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i16> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -1045,10 +975,6 @@ define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i16> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'constant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -1118,10 +1044,6 @@ define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <4 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v4i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <4 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift -; %shift = shl <4 x i64> %a, ret <4 x i64> %shift } @@ -1151,10 +1073,6 @@ define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i64> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i64' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <8 x i64> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift -; %shift = shl <8 x i64> %a, ret <8 x i64> %shift } @@ -1193,10 +1111,6 @@ define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <8 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v8i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <8 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift -; %shift = shl <8 x i32> %a, ret <8 x i32> %shift } @@ -1226,10 +1140,6 @@ define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i32> %a, ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i32' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <16 x i32> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift -; %shift = shl <16 x i32> %a, ret <16 x i32> %shift } @@ -1272,10 +1182,6 @@ define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <16 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v16i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = shl <16 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift -; %shift = shl <16 x i16> %a, ret <16 x i16> %shift } @@ -1309,10 +1215,6 @@ define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = shl <32 x i16> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i16' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = shl <32 x i16> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift -; %shift = shl <32 x i16> %a, ret <32 x i16> %shift } @@ -1371,10 +1273,6 @@ define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <32 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v32i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = shl <32 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift -; %shift = shl <32 x i8> %a, ret <32 x i8> %shift } @@ -1408,10 +1306,6 @@ define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = shl <64 x i8> %a, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift ; -; BTVER2-LABEL: 'splatconstant_shift_v64i8' -; BTVER2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = shl <64 x i8> %a, -; BTVER2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift -; %shift = shl <64 x i8> %a, ret <64 x i8> %shift } -- 2.7.4