2551 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE23; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,SSE424; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX15; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX26; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+xop,+avx | FileCheck %s --check-prefixes=XOP,XOPAVX17; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+xop,+avx2 | FileCheck %s --check-prefixes=XOP,XOPAVX28; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F9; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512,AVX512F10; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512,AVX512BW11; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512vl | FileCheck %s --check-prefixes=AVX512,AVX512F12; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512dq,+avx512vl | FileCheck %s --check-prefixes=AVX512,AVX512VL13; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=AVX512,AVX512BWVL14;15; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mcpu=slm | FileCheck %s --check-prefixes=SSE,SLM16; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mcpu=goldmont | FileCheck %s --check-prefixes=SSE,SSE4217; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mcpu=btver2 | FileCheck %s --check-prefixes=AVX,AVX118; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mcpu=tigerlake | FileCheck %s --check-prefixes=AVX512,AVX512GFNI19 20; Verify the cost of vector shift left instructions.21 22;23; Variable Shifts24;25 26define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) {27; SSE-LABEL: 'var_shift_v2i64'28; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:6 SizeLat:7 for: %shift = shl <2 x i64> %a, %b29; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift30;31; AVX1-LABEL: 'var_shift_v2i64'32; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:6 for: %shift = shl <2 x i64> %a, %b33; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift34;35; AVX2-LABEL: 'var_shift_v2i64'36; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, %b37; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift38;39; XOPAVX1-LABEL: 'var_shift_v2i64'40; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, %b41; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift42;43; XOPAVX2-LABEL: 'var_shift_v2i64'44; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, %b45; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift46;47; AVX512-LABEL: 'var_shift_v2i64'48; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, %b49; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift50;51 %shift = shl <2 x i64> %a, %b52 ret <2 x i64> %shift53}54 55define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) {56; SSE-LABEL: 'var_shift_v4i64'57; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:12 SizeLat:14 for: %shift = shl <4 x i64> %a, %b58; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift59;60; AVX1-LABEL: 'var_shift_v4i64'61; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:7 SizeLat:15 for: %shift = shl <4 x i64> %a, %b62; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift63;64; AVX2-LABEL: 'var_shift_v4i64'65; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %b66; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift67;68; XOPAVX1-LABEL: 'var_shift_v4i64'69; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <4 x i64> %a, %b70; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift71;72; XOPAVX2-LABEL: 'var_shift_v4i64'73; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %b74; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift75;76; AVX512-LABEL: 'var_shift_v4i64'77; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i64> %a, %b78; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift79;80 %shift = shl <4 x i64> %a, %b81 ret <4 x i64> %shift82}83 84define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) {85; SSE-LABEL: 'var_shift_v8i64'86; SSE-NEXT: Cost Model: Found costs of RThru:16 CodeSize:20 Lat:24 SizeLat:28 for: %shift = shl <8 x i64> %a, %b87; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift88;89; AVX1-LABEL: 'var_shift_v8i64'90; AVX1-NEXT: Cost Model: Found costs of RThru:12 CodeSize:22 Lat:14 SizeLat:30 for: %shift = shl <8 x i64> %a, %b91; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift92;93; AVX2-LABEL: 'var_shift_v8i64'94; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %b95; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift96;97; XOPAVX1-LABEL: 'var_shift_v8i64'98; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <8 x i64> %a, %b99; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift100;101; XOPAVX2-LABEL: 'var_shift_v8i64'102; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %b103; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift104;105; AVX512-LABEL: 'var_shift_v8i64'106; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i64> %a, %b107; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift108;109 %shift = shl <8 x i64> %a, %b110 ret <8 x i64> %shift111}112 113define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) {114; SSE2-LABEL: 'var_shift_v4i32'115; SSE2-NEXT: Cost Model: Found costs of RThru:17 CodeSize:10 Lat:19 SizeLat:12 for: %shift = shl <4 x i32> %a, %b116; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift117;118; SSE42-LABEL: 'var_shift_v4i32'119; SSE42-NEXT: Cost Model: Found costs of RThru:14 CodeSize:4 Lat:20 SizeLat:10 for: %shift = shl <4 x i32> %a, %b120; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift121;122; AVX1-LABEL: 'var_shift_v4i32'123; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:11 SizeLat:6 for: %shift = shl <4 x i32> %a, %b124; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift125;126; AVX2-LABEL: 'var_shift_v4i32'127; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:3 for: %shift = shl <4 x i32> %a, %b128; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift129;130; XOP-LABEL: 'var_shift_v4i32'131; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <4 x i32> %a, %b132; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift133;134; AVX512-LABEL: 'var_shift_v4i32'135; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, %b136; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift137;138; SLM-LABEL: 'var_shift_v4i32'139; SLM-NEXT: Cost Model: Found costs of RThru:14 CodeSize:4 Lat:20 SizeLat:10 for: %shift = shl <4 x i32> %a, %b140; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift141;142 %shift = shl <4 x i32> %a, %b143 ret <4 x i32> %shift144}145 146define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) {147; SSE2-LABEL: 'var_shift_v8i32'148; SSE2-NEXT: Cost Model: Found costs of RThru:34 CodeSize:20 Lat:38 SizeLat:24 for: %shift = shl <8 x i32> %a, %b149; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift150;151; SSE42-LABEL: 'var_shift_v8i32'152; SSE42-NEXT: Cost Model: Found costs of RThru:28 CodeSize:8 Lat:40 SizeLat:20 for: %shift = shl <8 x i32> %a, %b153; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift154;155; AVX1-LABEL: 'var_shift_v8i32'156; AVX1-NEXT: Cost Model: Found costs of RThru:9 CodeSize:12 Lat:11 SizeLat:17 for: %shift = shl <8 x i32> %a, %b157; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift158;159; AVX2-LABEL: 'var_shift_v8i32'160; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %b161; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift162;163; XOPAVX1-LABEL: 'var_shift_v8i32'164; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <8 x i32> %a, %b165; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift166;167; XOPAVX2-LABEL: 'var_shift_v8i32'168; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %b169; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift170;171; AVX512-LABEL: 'var_shift_v8i32'172; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i32> %a, %b173; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift174;175; SLM-LABEL: 'var_shift_v8i32'176; SLM-NEXT: Cost Model: Found costs of RThru:28 CodeSize:8 Lat:40 SizeLat:20 for: %shift = shl <8 x i32> %a, %b177; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift178;179 %shift = shl <8 x i32> %a, %b180 ret <8 x i32> %shift181}182 183define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) {184; SSE2-LABEL: 'var_shift_v16i32'185; SSE2-NEXT: Cost Model: Found costs of RThru:68 CodeSize:40 Lat:76 SizeLat:48 for: %shift = shl <16 x i32> %a, %b186; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift187;188; SSE42-LABEL: 'var_shift_v16i32'189; SSE42-NEXT: Cost Model: Found costs of RThru:56 CodeSize:16 Lat:80 SizeLat:40 for: %shift = shl <16 x i32> %a, %b190; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift191;192; AVX1-LABEL: 'var_shift_v16i32'193; AVX1-NEXT: Cost Model: Found costs of RThru:18 CodeSize:24 Lat:22 SizeLat:34 for: %shift = shl <16 x i32> %a, %b194; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift195;196; AVX2-LABEL: 'var_shift_v16i32'197; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %b198; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift199;200; XOPAVX1-LABEL: 'var_shift_v16i32'201; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <16 x i32> %a, %b202; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift203;204; XOPAVX2-LABEL: 'var_shift_v16i32'205; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %b206; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift207;208; AVX512-LABEL: 'var_shift_v16i32'209; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i32> %a, %b210; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift211;212; SLM-LABEL: 'var_shift_v16i32'213; SLM-NEXT: Cost Model: Found costs of RThru:56 CodeSize:16 Lat:80 SizeLat:40 for: %shift = shl <16 x i32> %a, %b214; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift215;216 %shift = shl <16 x i32> %a, %b217 ret <16 x i32> %shift218}219 220define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) {221; SSE2-LABEL: 'var_shift_v8i16'222; SSE2-NEXT: Cost Model: Found costs of RThru:24 CodeSize:16 Lat:27 SizeLat:20 for: %shift = shl <8 x i16> %a, %b223; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift224;225; SSE42-LABEL: 'var_shift_v8i16'226; SSE42-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:14 SizeLat:11 for: %shift = shl <8 x i16> %a, %b227; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift228;229; AVX1-LABEL: 'var_shift_v8i16'230; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:9 SizeLat:11 for: %shift = shl <8 x i16> %a, %b231; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift232;233; AVX2-LABEL: 'var_shift_v8i16'234; AVX2-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:18 SizeLat:10 for: %shift = shl <8 x i16> %a, %b235; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift236;237; XOP-LABEL: 'var_shift_v8i16'238; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <8 x i16> %a, %b239; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift240;241; AVX512F-LABEL: 'var_shift_v8i16'242; AVX512F-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:18 SizeLat:10 for: %shift = shl <8 x i16> %a, %b243; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift244;245; AVX512BW-LABEL: 'var_shift_v8i16'246; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, %b247; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift248;249; AVX512VL-LABEL: 'var_shift_v8i16'250; AVX512VL-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:18 SizeLat:10 for: %shift = shl <8 x i16> %a, %b251; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift252;253; AVX512BWVL-LABEL: 'var_shift_v8i16'254; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, %b255; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift256;257; SLM-LABEL: 'var_shift_v8i16'258; SLM-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:14 SizeLat:11 for: %shift = shl <8 x i16> %a, %b259; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift260;261; AVX512GFNI-LABEL: 'var_shift_v8i16'262; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, %b263; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift264;265 %shift = shl <8 x i16> %a, %b266 ret <8 x i16> %shift267}268 269define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) {270; SSE2-LABEL: 'var_shift_v16i16'271; SSE2-NEXT: Cost Model: Found costs of RThru:48 CodeSize:32 Lat:54 SizeLat:40 for: %shift = shl <16 x i16> %a, %b272; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift273;274; SSE42-LABEL: 'var_shift_v16i16'275; SSE42-NEXT: Cost Model: Found costs of RThru:22 CodeSize:22 Lat:28 SizeLat:22 for: %shift = shl <16 x i16> %a, %b276; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift277;278; AVX1-LABEL: 'var_shift_v16i16'279; AVX1-NEXT: Cost Model: Found costs of RThru:13 CodeSize:24 Lat:16 SizeLat:25 for: %shift = shl <16 x i16> %a, %b280; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift281;282; AVX2-LABEL: 'var_shift_v16i16'283; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:10 SizeLat:14 for: %shift = shl <16 x i16> %a, %b284; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift285;286; XOP-LABEL: 'var_shift_v16i16'287; XOP-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <16 x i16> %a, %b288; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift289;290; AVX512F-LABEL: 'var_shift_v16i16'291; AVX512F-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:10 SizeLat:14 for: %shift = shl <16 x i16> %a, %b292; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift293;294; AVX512BW-LABEL: 'var_shift_v16i16'295; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, %b296; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift297;298; AVX512VL-LABEL: 'var_shift_v16i16'299; AVX512VL-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:10 SizeLat:14 for: %shift = shl <16 x i16> %a, %b300; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift301;302; AVX512BWVL-LABEL: 'var_shift_v16i16'303; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, %b304; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift305;306; SLM-LABEL: 'var_shift_v16i16'307; SLM-NEXT: Cost Model: Found costs of RThru:22 CodeSize:22 Lat:28 SizeLat:22 for: %shift = shl <16 x i16> %a, %b308; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift309;310; AVX512GFNI-LABEL: 'var_shift_v16i16'311; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, %b312; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift313;314 %shift = shl <16 x i16> %a, %b315 ret <16 x i16> %shift316}317 318define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) {319; SSE2-LABEL: 'var_shift_v32i16'320; SSE2-NEXT: Cost Model: Found costs of RThru:96 CodeSize:64 Lat:108 SizeLat:80 for: %shift = shl <32 x i16> %a, %b321; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift322;323; SSE42-LABEL: 'var_shift_v32i16'324; SSE42-NEXT: Cost Model: Found costs of RThru:44 CodeSize:44 Lat:56 SizeLat:44 for: %shift = shl <32 x i16> %a, %b325; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift326;327; AVX1-LABEL: 'var_shift_v32i16'328; AVX1-NEXT: Cost Model: Found costs of RThru:26 CodeSize:48 Lat:32 SizeLat:50 for: %shift = shl <32 x i16> %a, %b329; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift330;331; AVX2-LABEL: 'var_shift_v32i16'332; AVX2-NEXT: Cost Model: Found costs of RThru:16 CodeSize:20 Lat:20 SizeLat:28 for: %shift = shl <32 x i16> %a, %b333; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift334;335; XOP-LABEL: 'var_shift_v32i16'336; XOP-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <32 x i16> %a, %b337; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift338;339; AVX512F-LABEL: 'var_shift_v32i16'340; AVX512F-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shift = shl <32 x i16> %a, %b341; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift342;343; AVX512BW-LABEL: 'var_shift_v32i16'344; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, %b345; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift346;347; AVX512VL-LABEL: 'var_shift_v32i16'348; AVX512VL-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shift = shl <32 x i16> %a, %b349; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift350;351; AVX512BWVL-LABEL: 'var_shift_v32i16'352; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, %b353; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift354;355; SLM-LABEL: 'var_shift_v32i16'356; SLM-NEXT: Cost Model: Found costs of RThru:44 CodeSize:44 Lat:56 SizeLat:44 for: %shift = shl <32 x i16> %a, %b357; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift358;359; AVX512GFNI-LABEL: 'var_shift_v32i16'360; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, %b361; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift362;363 %shift = shl <32 x i16> %a, %b364 ret <32 x i16> %shift365}366 367define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) {368; SSE2-LABEL: 'var_shift_v16i8'369; SSE2-NEXT: Cost Model: Found costs of RThru:13 CodeSize:26 Lat:21 SizeLat:28 for: %shift = shl <16 x i8> %a, %b370; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift371;372; SSE42-LABEL: 'var_shift_v16i8'373; SSE42-NEXT: Cost Model: Found costs of RThru:15 CodeSize:17 Lat:24 SizeLat:22 for: %shift = shl <16 x i8> %a, %b374; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift375;376; AVX1-LABEL: 'var_shift_v16i8'377; AVX1-NEXT: Cost Model: Found costs of RThru:10 CodeSize:11 Lat:21 SizeLat:17 for: %shift = shl <16 x i8> %a, %b378; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift379;380; AVX2-LABEL: 'var_shift_v16i8'381; AVX2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, %b382; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift383;384; XOP-LABEL: 'var_shift_v16i8'385; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <16 x i8> %a, %b386; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift387;388; AVX512F-LABEL: 'var_shift_v16i8'389; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, %b390; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift391;392; AVX512BW-LABEL: 'var_shift_v16i8'393; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, %b394; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift395;396; AVX512VL-LABEL: 'var_shift_v16i8'397; AVX512VL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, %b398; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift399;400; AVX512BWVL-LABEL: 'var_shift_v16i8'401; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, %b402; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift403;404; SLM-LABEL: 'var_shift_v16i8'405; SLM-NEXT: Cost Model: Found costs of RThru:15 CodeSize:17 Lat:24 SizeLat:22 for: %shift = shl <16 x i8> %a, %b406; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift407;408; AVX512GFNI-LABEL: 'var_shift_v16i8'409; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, %b410; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift411;412 %shift = shl <16 x i8> %a, %b413 ret <16 x i8> %shift414}415 416define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) {417; SSE2-LABEL: 'var_shift_v32i8'418; SSE2-NEXT: Cost Model: Found costs of RThru:26 CodeSize:52 Lat:42 SizeLat:56 for: %shift = shl <32 x i8> %a, %b419; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift420;421; SSE42-LABEL: 'var_shift_v32i8'422; SSE42-NEXT: Cost Model: Found costs of RThru:30 CodeSize:34 Lat:48 SizeLat:44 for: %shift = shl <32 x i8> %a, %b423; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift424;425; AVX1-LABEL: 'var_shift_v32i8'426; AVX1-NEXT: Cost Model: Found costs of RThru:22 CodeSize:27 Lat:22 SizeLat:40 for: %shift = shl <32 x i8> %a, %b427; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift428;429; AVX2-LABEL: 'var_shift_v32i8'430; AVX2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, %b431; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift432;433; XOP-LABEL: 'var_shift_v32i8'434; XOP-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <32 x i8> %a, %b435; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift436;437; AVX512F-LABEL: 'var_shift_v32i8'438; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, %b439; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift440;441; AVX512BW-LABEL: 'var_shift_v32i8'442; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, %b443; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift444;445; AVX512VL-LABEL: 'var_shift_v32i8'446; AVX512VL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, %b447; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift448;449; AVX512BWVL-LABEL: 'var_shift_v32i8'450; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, %b451; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift452;453; SLM-LABEL: 'var_shift_v32i8'454; SLM-NEXT: Cost Model: Found costs of RThru:30 CodeSize:34 Lat:48 SizeLat:44 for: %shift = shl <32 x i8> %a, %b455; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift456;457; AVX512GFNI-LABEL: 'var_shift_v32i8'458; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, %b459; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift460;461 %shift = shl <32 x i8> %a, %b462 ret <32 x i8> %shift463}464 465define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) {466; SSE2-LABEL: 'var_shift_v64i8'467; SSE2-NEXT: Cost Model: Found costs of RThru:52 CodeSize:104 Lat:84 SizeLat:112 for: %shift = shl <64 x i8> %a, %b468; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift469;470; SSE42-LABEL: 'var_shift_v64i8'471; SSE42-NEXT: Cost Model: Found costs of RThru:60 CodeSize:68 Lat:96 SizeLat:88 for: %shift = shl <64 x i8> %a, %b472; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift473;474; AVX1-LABEL: 'var_shift_v64i8'475; AVX1-NEXT: Cost Model: Found costs of RThru:44 CodeSize:54 Lat:44 SizeLat:80 for: %shift = shl <64 x i8> %a, %b476; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift477;478; AVX2-LABEL: 'var_shift_v64i8'479; AVX2-NEXT: Cost Model: Found costs of RThru:12 CodeSize:22 Lat:46 SizeLat:44 for: %shift = shl <64 x i8> %a, %b480; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift481;482; XOP-LABEL: 'var_shift_v64i8'483; XOP-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <64 x i8> %a, %b484; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift485;486; AVX512F-LABEL: 'var_shift_v64i8'487; AVX512F-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %b488; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift489;490; AVX512BW-LABEL: 'var_shift_v64i8'491; AVX512BW-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, %b492; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift493;494; AVX512VL-LABEL: 'var_shift_v64i8'495; AVX512VL-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %b496; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift497;498; AVX512BWVL-LABEL: 'var_shift_v64i8'499; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, %b500; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift501;502; SLM-LABEL: 'var_shift_v64i8'503; SLM-NEXT: Cost Model: Found costs of RThru:60 CodeSize:68 Lat:96 SizeLat:88 for: %shift = shl <64 x i8> %a, %b504; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift505;506; AVX512GFNI-LABEL: 'var_shift_v64i8'507; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, %b508; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift509;510 %shift = shl <64 x i8> %a, %b511 ret <64 x i8> %shift512}513 514;515; Uniform Variable Shifts516;517 518define <2 x i64> @splatvar_shift_v2i64(<2 x i64> %a, i64 %b) {519; SSE-LABEL: 'splatvar_shift_v2i64'520; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> poison, i64 %b, i32 0521; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer522; SSE-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat523; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift524;525; AVX1-LABEL: 'splatvar_shift_v2i64'526; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> poison, i64 %b, i32 0527; AVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer528; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat529; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift530;531; AVX2-LABEL: 'splatvar_shift_v2i64'532; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> poison, i64 %b, i32 0533; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer534; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat535; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift536;537; XOPAVX1-LABEL: 'splatvar_shift_v2i64'538; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> poison, i64 %b, i32 0539; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer540; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat541; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift542;543; XOPAVX2-LABEL: 'splatvar_shift_v2i64'544; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> poison, i64 %b, i32 0545; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer546; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat547; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift548;549; AVX512-LABEL: 'splatvar_shift_v2i64'550; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> poison, i64 %b, i32 0551; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer552; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat553; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift554;555 %insert = insertelement <2 x i64> poison, i64 %b, i32 0556 %splat = shufflevector <2 x i64> %insert, <2 x i64> poison, <2 x i32> zeroinitializer557 %shift = shl <2 x i64> %a, %splat558 ret <2 x i64> %shift559}560 561define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) {562; SSE-LABEL: 'splatvar_shift_v4i64'563; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> poison, i64 %b, i32 0564; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer565; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <4 x i64> %a, %splat566; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift567;568; AVX1-LABEL: 'splatvar_shift_v4i64'569; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> poison, i64 %b, i32 0570; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer571; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:7 SizeLat:6 for: %shift = shl <4 x i64> %a, %splat572; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift573;574; AVX2-LABEL: 'splatvar_shift_v4i64'575; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> poison, i64 %b, i32 0576; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer577; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %splat578; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift579;580; XOPAVX1-LABEL: 'splatvar_shift_v4i64'581; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> poison, i64 %b, i32 0582; XOPAVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer583; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:7 SizeLat:6 for: %shift = shl <4 x i64> %a, %splat584; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift585;586; XOPAVX2-LABEL: 'splatvar_shift_v4i64'587; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> poison, i64 %b, i32 0588; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer589; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %splat590; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift591;592; AVX512-LABEL: 'splatvar_shift_v4i64'593; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> poison, i64 %b, i32 0594; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer595; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %splat596; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift597;598 %insert = insertelement <4 x i64> poison, i64 %b, i32 0599 %splat = shufflevector <4 x i64> %insert, <4 x i64> poison, <4 x i32> zeroinitializer600 %shift = shl <4 x i64> %a, %splat601 ret <4 x i64> %shift602}603 604define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) {605; SSE-LABEL: 'splatvar_shift_v8i64'606; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> poison, i64 %b, i32 0607; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer608; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <8 x i64> %a, %splat609; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift610;611; AVX1-LABEL: 'splatvar_shift_v8i64'612; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> poison, i64 %b, i32 0613; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer614; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:14 SizeLat:12 for: %shift = shl <8 x i64> %a, %splat615; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift616;617; AVX2-LABEL: 'splatvar_shift_v8i64'618; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> poison, i64 %b, i32 0619; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer620; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %splat621; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift622;623; XOPAVX1-LABEL: 'splatvar_shift_v8i64'624; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> poison, i64 %b, i32 0625; XOPAVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer626; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:14 SizeLat:12 for: %shift = shl <8 x i64> %a, %splat627; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift628;629; XOPAVX2-LABEL: 'splatvar_shift_v8i64'630; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> poison, i64 %b, i32 0631; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer632; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %splat633; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift634;635; AVX512-LABEL: 'splatvar_shift_v8i64'636; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> poison, i64 %b, i32 0637; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer638; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <8 x i64> %a, %splat639; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift640;641 %insert = insertelement <8 x i64> poison, i64 %b, i32 0642 %splat = shufflevector <8 x i64> %insert, <8 x i64> poison, <8 x i32> zeroinitializer643 %shift = shl <8 x i64> %a, %splat644 ret <8 x i64> %shift645}646 647define <4 x i32> @splatvar_shift_v4i32(<4 x i32> %a, i32 %b) {648; SSE-LABEL: 'splatvar_shift_v4i32'649; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> poison, i32 %b, i32 0650; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer651; SSE-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat652; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift653;654; AVX1-LABEL: 'splatvar_shift_v4i32'655; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> poison, i32 %b, i32 0656; AVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer657; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat658; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift659;660; AVX2-LABEL: 'splatvar_shift_v4i32'661; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> poison, i32 %b, i32 0662; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer663; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat664; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift665;666; XOPAVX1-LABEL: 'splatvar_shift_v4i32'667; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> poison, i32 %b, i32 0668; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer669; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat670; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift671;672; XOPAVX2-LABEL: 'splatvar_shift_v4i32'673; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> poison, i32 %b, i32 0674; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer675; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat676; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift677;678; AVX512-LABEL: 'splatvar_shift_v4i32'679; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> poison, i32 %b, i32 0680; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer681; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat682; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift683;684 %insert = insertelement <4 x i32> poison, i32 %b, i32 0685 %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer686 %shift = shl <4 x i32> %a, %splat687 ret <4 x i32> %shift688}689 690define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) {691; SSE-LABEL: 'splatvar_shift_v8i32'692; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> poison, i32 %b, i32 0693; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer694; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <8 x i32> %a, %splat695; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift696;697; AVX1-LABEL: 'splatvar_shift_v8i32'698; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> poison, i32 %b, i32 0699; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer700; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <8 x i32> %a, %splat701; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift702;703; AVX2-LABEL: 'splatvar_shift_v8i32'704; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> poison, i32 %b, i32 0705; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer706; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %splat707; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift708;709; XOPAVX1-LABEL: 'splatvar_shift_v8i32'710; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> poison, i32 %b, i32 0711; XOPAVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer712; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <8 x i32> %a, %splat713; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift714;715; XOPAVX2-LABEL: 'splatvar_shift_v8i32'716; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> poison, i32 %b, i32 0717; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer718; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %splat719; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift720;721; AVX512-LABEL: 'splatvar_shift_v8i32'722; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> poison, i32 %b, i32 0723; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer724; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %splat725; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift726;727 %insert = insertelement <8 x i32> poison, i32 %b, i32 0728 %splat = shufflevector <8 x i32> %insert, <8 x i32> poison, <8 x i32> zeroinitializer729 %shift = shl <8 x i32> %a, %splat730 ret <8 x i32> %shift731}732 733define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) {734; SSE-LABEL: 'splatvar_shift_v16i32'735; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> poison, i32 %b, i32 0736; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer737; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <16 x i32> %a, %splat738; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift739;740; AVX1-LABEL: 'splatvar_shift_v16i32'741; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> poison, i32 %b, i32 0742; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer743; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <16 x i32> %a, %splat744; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift745;746; AVX2-LABEL: 'splatvar_shift_v16i32'747; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> poison, i32 %b, i32 0748; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer749; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %splat750; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift751;752; XOPAVX1-LABEL: 'splatvar_shift_v16i32'753; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> poison, i32 %b, i32 0754; XOPAVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:3 SizeLat:3 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer755; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <16 x i32> %a, %splat756; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift757;758; XOPAVX2-LABEL: 'splatvar_shift_v16i32'759; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> poison, i32 %b, i32 0760; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer761; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %splat762; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift763;764; AVX512-LABEL: 'splatvar_shift_v16i32'765; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> poison, i32 %b, i32 0766; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer767; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i32> %a, %splat768; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift769;770 %insert = insertelement <16 x i32> poison, i32 %b, i32 0771 %splat = shufflevector <16 x i32> %insert, <16 x i32> poison, <16 x i32> zeroinitializer772 %shift = shl <16 x i32> %a, %splat773 ret <16 x i32> %shift774}775 776define <8 x i16> @splatvar_shift_v8i16(<8 x i16> %a, i16 %b) {777; SSE2-LABEL: 'splatvar_shift_v8i16'778; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0779; SSE2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:2 SizeLat:2 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer780; SSE2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat781; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift782;783; SSE42-LABEL: 'splatvar_shift_v8i16'784; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0785; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer786; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat787; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift788;789; AVX1-LABEL: 'splatvar_shift_v8i16'790; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0791; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer792; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat793; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift794;795; AVX2-LABEL: 'splatvar_shift_v8i16'796; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0797; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer798; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat799; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift800;801; XOPAVX1-LABEL: 'splatvar_shift_v8i16'802; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0803; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer804; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat805; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift806;807; XOPAVX2-LABEL: 'splatvar_shift_v8i16'808; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0809; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer810; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat811; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift812;813; AVX512-LABEL: 'splatvar_shift_v8i16'814; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0815; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer816; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat817; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift818;819; SLM-LABEL: 'splatvar_shift_v8i16'820; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> poison, i16 %b, i32 0821; SLM-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer822; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat823; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift824;825 %insert = insertelement <8 x i16> poison, i16 %b, i32 0826 %splat = shufflevector <8 x i16> %insert, <8 x i16> poison, <8 x i32> zeroinitializer827 %shift = shl <8 x i16> %a, %splat828 ret <8 x i16> %shift829}830 831define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) {832; SSE2-LABEL: 'splatvar_shift_v16i16'833; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0834; SSE2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:2 SizeLat:2 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer835; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i16> %a, %splat836; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift837;838; SSE42-LABEL: 'splatvar_shift_v16i16'839; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0840; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer841; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i16> %a, %splat842; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift843;844; AVX1-LABEL: 'splatvar_shift_v16i16'845; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0846; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:3 Lat:3 SizeLat:4 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer847; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <16 x i16> %a, %splat848; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift849;850; AVX2-LABEL: 'splatvar_shift_v16i16'851; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0852; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer853; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i16> %a, %splat854; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift855;856; XOPAVX1-LABEL: 'splatvar_shift_v16i16'857; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0858; XOPAVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:3 Lat:3 SizeLat:4 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer859; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <16 x i16> %a, %splat860; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift861;862; XOPAVX2-LABEL: 'splatvar_shift_v16i16'863; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0864; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer865; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i16> %a, %splat866; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift867;868; AVX512-LABEL: 'splatvar_shift_v16i16'869; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0870; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer871; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i16> %a, %splat872; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift873;874; SLM-LABEL: 'splatvar_shift_v16i16'875; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> poison, i16 %b, i32 0876; SLM-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer877; SLM-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i16> %a, %splat878; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift879;880 %insert = insertelement <16 x i16> poison, i16 %b, i32 0881 %splat = shufflevector <16 x i16> %insert, <16 x i16> poison, <16 x i32> zeroinitializer882 %shift = shl <16 x i16> %a, %splat883 ret <16 x i16> %shift884}885 886define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) {887; SSE2-LABEL: 'splatvar_shift_v32i16'888; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0889; SSE2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:2 SizeLat:2 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer890; SSE2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <32 x i16> %a, %splat891; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift892;893; SSE42-LABEL: 'splatvar_shift_v32i16'894; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0895; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer896; SSE42-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <32 x i16> %a, %splat897; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift898;899; AVX1-LABEL: 'splatvar_shift_v32i16'900; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0901; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:3 Lat:3 SizeLat:4 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer902; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <32 x i16> %a, %splat903; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift904;905; AVX2-LABEL: 'splatvar_shift_v32i16'906; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0907; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer908; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <32 x i16> %a, %splat909; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift910;911; XOPAVX1-LABEL: 'splatvar_shift_v32i16'912; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0913; XOPAVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:3 Lat:3 SizeLat:4 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer914; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <32 x i16> %a, %splat915; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift916;917; XOPAVX2-LABEL: 'splatvar_shift_v32i16'918; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0919; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer920; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <32 x i16> %a, %splat921; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift922;923; AVX512F-LABEL: 'splatvar_shift_v32i16'924; AVX512F-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0925; AVX512F-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer926; AVX512F-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:10 SizeLat:7 for: %shift = shl <32 x i16> %a, %splat927; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift928;929; AVX512BW-LABEL: 'splatvar_shift_v32i16'930; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0931; AVX512BW-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer932; AVX512BW-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <32 x i16> %a, %splat933; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift934;935; AVX512VL-LABEL: 'splatvar_shift_v32i16'936; AVX512VL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0937; AVX512VL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer938; AVX512VL-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:10 SizeLat:7 for: %shift = shl <32 x i16> %a, %splat939; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift940;941; AVX512BWVL-LABEL: 'splatvar_shift_v32i16'942; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0943; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer944; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <32 x i16> %a, %splat945; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift946;947; SLM-LABEL: 'splatvar_shift_v32i16'948; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0949; SLM-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer950; SLM-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <32 x i16> %a, %splat951; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift952;953; AVX512GFNI-LABEL: 'splatvar_shift_v32i16'954; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> poison, i16 %b, i32 0955; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer956; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <32 x i16> %a, %splat957; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift958;959 %insert = insertelement <32 x i16> poison, i16 %b, i32 0960 %splat = shufflevector <32 x i16> %insert, <32 x i16> poison, <32 x i32> zeroinitializer961 %shift = shl <32 x i16> %a, %splat962 ret <32 x i16> %shift963}964 965define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) {966; SSE2-LABEL: 'splatvar_shift_v16i8'967; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 0968; SSE2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:3 Lat:3 SizeLat:4 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer969; SSE2-NEXT: Cost Model: Found costs of RThru:9 CodeSize:6 Lat:10 SizeLat:9 for: %shift = shl <16 x i8> %a, %splat970; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift971;972; SSE42-LABEL: 'splatvar_shift_v16i8'973; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 0974; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer975; SSE42-NEXT: Cost Model: Found costs of RThru:9 CodeSize:6 Lat:10 SizeLat:9 for: %shift = shl <16 x i8> %a, %splat976; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift977;978; AVX1-LABEL: 'splatvar_shift_v16i8'979; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 0980; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer981; AVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:8 for: %shift = shl <16 x i8> %a, %splat982; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift983;984; AVX2-LABEL: 'splatvar_shift_v16i8'985; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 0986; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer987; AVX2-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:5 SizeLat:7 for: %shift = shl <16 x i8> %a, %splat988; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift989;990; XOPAVX1-LABEL: 'splatvar_shift_v16i8'991; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 0992; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer993; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <16 x i8> %a, %splat994; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift995;996; XOPAVX2-LABEL: 'splatvar_shift_v16i8'997; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 0998; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer999; XOPAVX2-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:5 SizeLat:7 for: %shift = shl <16 x i8> %a, %splat1000; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1001;1002; AVX512-LABEL: 'splatvar_shift_v16i8'1003; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 01004; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer1005; AVX512-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:5 SizeLat:7 for: %shift = shl <16 x i8> %a, %splat1006; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1007;1008; SLM-LABEL: 'splatvar_shift_v16i8'1009; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> poison, i8 %b, i32 01010; SLM-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer1011; SLM-NEXT: Cost Model: Found costs of RThru:9 CodeSize:6 Lat:10 SizeLat:9 for: %shift = shl <16 x i8> %a, %splat1012; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1013;1014 %insert = insertelement <16 x i8> poison, i8 %b, i32 01015 %splat = shufflevector <16 x i8> %insert, <16 x i8> poison, <16 x i32> zeroinitializer1016 %shift = shl <16 x i8> %a, %splat1017 ret <16 x i8> %shift1018}1019 1020define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) {1021; SSE2-LABEL: 'splatvar_shift_v32i8'1022; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01023; SSE2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:3 Lat:3 SizeLat:4 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1024; SSE2-NEXT: Cost Model: Found costs of RThru:18 CodeSize:12 Lat:20 SizeLat:18 for: %shift = shl <32 x i8> %a, %splat1025; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1026;1027; SSE42-LABEL: 'splatvar_shift_v32i8'1028; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01029; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1030; SSE42-NEXT: Cost Model: Found costs of RThru:18 CodeSize:12 Lat:20 SizeLat:18 for: %shift = shl <32 x i8> %a, %splat1031; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1032;1033; AVX1-LABEL: 'splatvar_shift_v32i8'1034; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01035; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:3 Lat:4 SizeLat:6 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1036; AVX1-NEXT: Cost Model: Found costs of RThru:7 CodeSize:11 Lat:8 SizeLat:14 for: %shift = shl <32 x i8> %a, %splat1037; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1038;1039; AVX2-LABEL: 'splatvar_shift_v32i8'1040; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01041; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1042; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <32 x i8> %a, %splat1043; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1044;1045; XOPAVX1-LABEL: 'splatvar_shift_v32i8'1046; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01047; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:3 Lat:4 SizeLat:6 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1048; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <32 x i8> %a, %splat1049; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1050;1051; XOPAVX2-LABEL: 'splatvar_shift_v32i8'1052; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01053; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1054; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <32 x i8> %a, %splat1055; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1056;1057; AVX512-LABEL: 'splatvar_shift_v32i8'1058; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01059; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1060; AVX512-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <32 x i8> %a, %splat1061; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1062;1063; SLM-LABEL: 'splatvar_shift_v32i8'1064; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> poison, i8 %b, i32 01065; SLM-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1066; SLM-NEXT: Cost Model: Found costs of RThru:18 CodeSize:12 Lat:20 SizeLat:18 for: %shift = shl <32 x i8> %a, %splat1067; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1068;1069 %insert = insertelement <32 x i8> poison, i8 %b, i32 01070 %splat = shufflevector <32 x i8> %insert, <32 x i8> poison, <32 x i32> zeroinitializer1071 %shift = shl <32 x i8> %a, %splat1072 ret <32 x i8> %shift1073}1074 1075define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) {1076; SSE2-LABEL: 'splatvar_shift_v64i8'1077; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01078; SSE2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:3 Lat:3 SizeLat:4 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1079; SSE2-NEXT: Cost Model: Found costs of RThru:36 CodeSize:24 Lat:40 SizeLat:36 for: %shift = shl <64 x i8> %a, %splat1080; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1081;1082; SSE42-LABEL: 'splatvar_shift_v64i8'1083; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01084; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1085; SSE42-NEXT: Cost Model: Found costs of RThru:36 CodeSize:24 Lat:40 SizeLat:36 for: %shift = shl <64 x i8> %a, %splat1086; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1087;1088; AVX1-LABEL: 'splatvar_shift_v64i8'1089; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01090; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:3 Lat:4 SizeLat:6 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1091; AVX1-NEXT: Cost Model: Found costs of RThru:14 CodeSize:22 Lat:16 SizeLat:28 for: %shift = shl <64 x i8> %a, %splat1092; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1093;1094; AVX2-LABEL: 'splatvar_shift_v64i8'1095; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01096; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1097; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:12 Lat:14 SizeLat:16 for: %shift = shl <64 x i8> %a, %splat1098; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1099;1100; XOPAVX1-LABEL: 'splatvar_shift_v64i8'1101; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01102; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:3 Lat:4 SizeLat:6 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1103; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <64 x i8> %a, %splat1104; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1105;1106; XOPAVX2-LABEL: 'splatvar_shift_v64i8'1107; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01108; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1109; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:12 Lat:14 SizeLat:16 for: %shift = shl <64 x i8> %a, %splat1110; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1111;1112; AVX512F-LABEL: 'splatvar_shift_v64i8'1113; AVX512F-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01114; AVX512F-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1115; AVX512F-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %splat1116; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1117;1118; AVX512BW-LABEL: 'splatvar_shift_v64i8'1119; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01120; AVX512BW-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1121; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <64 x i8> %a, %splat1122; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1123;1124; AVX512VL-LABEL: 'splatvar_shift_v64i8'1125; AVX512VL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01126; AVX512VL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1127; AVX512VL-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %splat1128; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1129;1130; AVX512BWVL-LABEL: 'splatvar_shift_v64i8'1131; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01132; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1133; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <64 x i8> %a, %splat1134; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1135;1136; SLM-LABEL: 'splatvar_shift_v64i8'1137; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01138; SLM-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:3 SizeLat:2 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1139; SLM-NEXT: Cost Model: Found costs of RThru:36 CodeSize:24 Lat:40 SizeLat:36 for: %shift = shl <64 x i8> %a, %splat1140; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1141;1142; AVX512GFNI-LABEL: 'splatvar_shift_v64i8'1143; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> poison, i8 %b, i32 01144; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1145; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <64 x i8> %a, %splat1146; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1147;1148 %insert = insertelement <64 x i8> poison, i8 %b, i32 01149 %splat = shufflevector <64 x i8> %insert, <64 x i8> poison, <64 x i32> zeroinitializer1150 %shift = shl <64 x i8> %a, %splat1151 ret <64 x i8> %shift1152}1153 1154;1155; Constant Shifts1156;1157 1158define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) {1159; SSE-LABEL: 'constant_shift_v2i64'1160; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:6 SizeLat:7 for: %shift = shl <2 x i64> %a, <i64 1, i64 7>1161; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1162;1163; AVX1-LABEL: 'constant_shift_v2i64'1164; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:6 for: %shift = shl <2 x i64> %a, <i64 1, i64 7>1165; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1166;1167; AVX2-LABEL: 'constant_shift_v2i64'1168; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, <i64 1, i64 7>1169; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1170;1171; XOPAVX1-LABEL: 'constant_shift_v2i64'1172; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, <i64 1, i64 7>1173; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1174;1175; XOPAVX2-LABEL: 'constant_shift_v2i64'1176; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, <i64 1, i64 7>1177; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1178;1179; AVX512-LABEL: 'constant_shift_v2i64'1180; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, <i64 1, i64 7>1181; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1182;1183 %shift = shl <2 x i64> %a, <i64 1, i64 7>1184 ret <2 x i64> %shift1185}1186 1187define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) {1188; SSE-LABEL: 'constant_shift_v4i64'1189; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:12 SizeLat:14 for: %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>1190; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1191;1192; AVX1-LABEL: 'constant_shift_v4i64'1193; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:7 SizeLat:15 for: %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>1194; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1195;1196; AVX2-LABEL: 'constant_shift_v4i64'1197; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>1198; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1199;1200; XOPAVX1-LABEL: 'constant_shift_v4i64'1201; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>1202; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1203;1204; XOPAVX2-LABEL: 'constant_shift_v4i64'1205; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>1206; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1207;1208; AVX512-LABEL: 'constant_shift_v4i64'1209; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>1210; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1211;1212 %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>1213 ret <4 x i64> %shift1214}1215 1216define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) {1217; SSE-LABEL: 'constant_shift_v8i64'1218; SSE-NEXT: Cost Model: Found costs of RThru:16 CodeSize:20 Lat:24 SizeLat:28 for: %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>1219; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1220;1221; AVX1-LABEL: 'constant_shift_v8i64'1222; AVX1-NEXT: Cost Model: Found costs of RThru:12 CodeSize:22 Lat:14 SizeLat:30 for: %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>1223; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1224;1225; AVX2-LABEL: 'constant_shift_v8i64'1226; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>1227; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1228;1229; XOPAVX1-LABEL: 'constant_shift_v8i64'1230; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>1231; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1232;1233; XOPAVX2-LABEL: 'constant_shift_v8i64'1234; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>1235; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1236;1237; AVX512-LABEL: 'constant_shift_v8i64'1238; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>1239; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1240;1241 %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>1242 ret <8 x i64> %shift1243}1244 1245define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) {1246; SSE2-LABEL: 'constant_shift_v4i32'1247; SSE2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:7 Lat:8 SizeLat:7 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1248; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1249;1250; SSE42-LABEL: 'constant_shift_v4i32'1251; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:11 SizeLat:1 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1252; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1253;1254; AVX1-LABEL: 'constant_shift_v4i32'1255; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:3 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1256; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1257;1258; AVX2-LABEL: 'constant_shift_v4i32'1259; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:3 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1260; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1261;1262; XOP-LABEL: 'constant_shift_v4i32'1263; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1264; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1265;1266; AVX512-LABEL: 'constant_shift_v4i32'1267; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1268; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1269;1270; SLM-LABEL: 'constant_shift_v4i32'1271; SLM-NEXT: Cost Model: Found costs of RThru:11 CodeSize:1 Lat:11 SizeLat:7 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1272; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1273;1274 %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>1275 ret <4 x i32> %shift1276}1277 1278define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) {1279; SSE2-LABEL: 'constant_shift_v8i32'1280; SSE2-NEXT: Cost Model: Found costs of RThru:12 CodeSize:14 Lat:16 SizeLat:14 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1281; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1282;1283; SSE42-LABEL: 'constant_shift_v8i32'1284; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:22 SizeLat:2 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1285; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1286;1287; AVX1-LABEL: 'constant_shift_v8i32'1288; AVX1-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:8 SizeLat:10 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1289; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1290;1291; AVX2-LABEL: 'constant_shift_v8i32'1292; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1293; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1294;1295; XOPAVX1-LABEL: 'constant_shift_v8i32'1296; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1297; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1298;1299; XOPAVX2-LABEL: 'constant_shift_v8i32'1300; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1301; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1302;1303; AVX512-LABEL: 'constant_shift_v8i32'1304; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1305; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1306;1307; SLM-LABEL: 'constant_shift_v8i32'1308; SLM-NEXT: Cost Model: Found costs of RThru:22 CodeSize:2 Lat:22 SizeLat:14 for: %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1309; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1310;1311 %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1312 ret <8 x i32> %shift1313}1314 1315define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) {1316; SSE2-LABEL: 'constant_shift_v16i32'1317; SSE2-NEXT: Cost Model: Found costs of RThru:24 CodeSize:28 Lat:32 SizeLat:28 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1318; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1319;1320; SSE42-LABEL: 'constant_shift_v16i32'1321; SSE42-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:44 SizeLat:4 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1322; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1323;1324; AVX1-LABEL: 'constant_shift_v16i32'1325; AVX1-NEXT: Cost Model: Found costs of RThru:10 CodeSize:10 Lat:16 SizeLat:20 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1326; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1327;1328; AVX2-LABEL: 'constant_shift_v16i32'1329; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1330; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1331;1332; XOPAVX1-LABEL: 'constant_shift_v16i32'1333; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1334; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1335;1336; XOPAVX2-LABEL: 'constant_shift_v16i32'1337; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1338; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1339;1340; AVX512-LABEL: 'constant_shift_v16i32'1341; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1342; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1343;1344; SLM-LABEL: 'constant_shift_v16i32'1345; SLM-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:44 SizeLat:28 for: %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1346; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1347;1348 %shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>1349 ret <16 x i32> %shift1350}1351 1352define <8 x i16> @constant_shift_v8i16(<8 x i16> %a) {1353; SSE2-LABEL: 'constant_shift_v8i16'1354; SSE2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1355; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1356;1357; SSE42-LABEL: 'constant_shift_v8i16'1358; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1359; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1360;1361; AVX-LABEL: 'constant_shift_v8i16'1362; AVX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1363; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1364;1365; XOP-LABEL: 'constant_shift_v8i16'1366; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1367; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1368;1369; AVX512F-LABEL: 'constant_shift_v8i16'1370; AVX512F-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1371; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1372;1373; AVX512BW-LABEL: 'constant_shift_v8i16'1374; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1375; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1376;1377; AVX512VL-LABEL: 'constant_shift_v8i16'1378; AVX512VL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1379; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1380;1381; AVX512BWVL-LABEL: 'constant_shift_v8i16'1382; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1383; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1384;1385; SLM-LABEL: 'constant_shift_v8i16'1386; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1387; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1388;1389; AVX512GFNI-LABEL: 'constant_shift_v8i16'1390; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1391; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1392;1393 %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1394 ret <8 x i16> %shift1395}1396 1397define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) {1398; SSE2-LABEL: 'constant_shift_v16i16'1399; SSE2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:10 SizeLat:2 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1400; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1401;1402; SSE42-LABEL: 'constant_shift_v16i16'1403; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:10 SizeLat:2 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1404; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1405;1406; AVX1-LABEL: 'constant_shift_v16i16'1407; AVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:8 SizeLat:6 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1408; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1409;1410; AVX2-LABEL: 'constant_shift_v16i16'1411; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1412; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1413;1414; XOPAVX1-LABEL: 'constant_shift_v16i16'1415; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1416; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1417;1418; XOPAVX2-LABEL: 'constant_shift_v16i16'1419; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1420; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1421;1422; AVX512F-LABEL: 'constant_shift_v16i16'1423; AVX512F-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1424; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1425;1426; AVX512BW-LABEL: 'constant_shift_v16i16'1427; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1428; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1429;1430; AVX512VL-LABEL: 'constant_shift_v16i16'1431; AVX512VL-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1432; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1433;1434; AVX512BWVL-LABEL: 'constant_shift_v16i16'1435; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1436; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1437;1438; SLM-LABEL: 'constant_shift_v16i16'1439; SLM-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:10 SizeLat:2 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1440; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1441;1442; AVX512GFNI-LABEL: 'constant_shift_v16i16'1443; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1444; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1445;1446 %shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1447 ret <16 x i16> %shift1448}1449 1450define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) {1451; SSE2-LABEL: 'constant_shift_v32i16'1452; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:20 SizeLat:4 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1453; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1454;1455; SSE42-LABEL: 'constant_shift_v32i16'1456; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:20 SizeLat:4 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1457; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1458;1459; AVX1-LABEL: 'constant_shift_v32i16'1460; AVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:16 SizeLat:12 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1461; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1462;1463; AVX2-LABEL: 'constant_shift_v32i16'1464; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:10 SizeLat:4 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1465; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1466;1467; XOPAVX1-LABEL: 'constant_shift_v32i16'1468; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1469; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1470;1471; XOPAVX2-LABEL: 'constant_shift_v32i16'1472; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:10 SizeLat:4 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1473; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1474;1475; AVX512F-LABEL: 'constant_shift_v32i16'1476; AVX512F-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1477; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1478;1479; AVX512BW-LABEL: 'constant_shift_v32i16'1480; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1481; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1482;1483; AVX512VL-LABEL: 'constant_shift_v32i16'1484; AVX512VL-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1485; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1486;1487; AVX512BWVL-LABEL: 'constant_shift_v32i16'1488; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1489; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1490;1491; SLM-LABEL: 'constant_shift_v32i16'1492; SLM-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:20 SizeLat:4 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1493; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1494;1495; AVX512GFNI-LABEL: 'constant_shift_v32i16'1496; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1497; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1498;1499 %shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>1500 ret <32 x i16> %shift1501}1502 1503define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) {1504; SSE2-LABEL: 'constant_shift_v16i8'1505; SSE2-NEXT: Cost Model: Found costs of RThru:13 CodeSize:26 Lat:21 SizeLat:28 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1506; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1507;1508; SSE42-LABEL: 'constant_shift_v16i8'1509; SSE42-NEXT: Cost Model: Found costs of RThru:15 CodeSize:17 Lat:24 SizeLat:22 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1510; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1511;1512; AVX1-LABEL: 'constant_shift_v16i8'1513; AVX1-NEXT: Cost Model: Found costs of RThru:10 CodeSize:11 Lat:21 SizeLat:17 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1514; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1515;1516; AVX2-LABEL: 'constant_shift_v16i8'1517; AVX2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1518; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1519;1520; XOP-LABEL: 'constant_shift_v16i8'1521; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1522; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1523;1524; AVX512F-LABEL: 'constant_shift_v16i8'1525; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1526; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1527;1528; AVX512BW-LABEL: 'constant_shift_v16i8'1529; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1530; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1531;1532; AVX512VL-LABEL: 'constant_shift_v16i8'1533; AVX512VL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1534; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1535;1536; AVX512BWVL-LABEL: 'constant_shift_v16i8'1537; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1538; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1539;1540; SLM-LABEL: 'constant_shift_v16i8'1541; SLM-NEXT: Cost Model: Found costs of RThru:15 CodeSize:17 Lat:24 SizeLat:22 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1542; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1543;1544; AVX512GFNI-LABEL: 'constant_shift_v16i8'1545; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1546; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1547;1548 %shift = shl <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1549 ret <16 x i8> %shift1550}1551 1552define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) {1553; SSE2-LABEL: 'constant_shift_v32i8'1554; SSE2-NEXT: Cost Model: Found costs of RThru:26 CodeSize:52 Lat:42 SizeLat:56 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1555; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1556;1557; SSE42-LABEL: 'constant_shift_v32i8'1558; SSE42-NEXT: Cost Model: Found costs of RThru:30 CodeSize:34 Lat:48 SizeLat:44 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1559; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1560;1561; AVX1-LABEL: 'constant_shift_v32i8'1562; AVX1-NEXT: Cost Model: Found costs of RThru:22 CodeSize:27 Lat:22 SizeLat:40 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1563; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1564;1565; AVX2-LABEL: 'constant_shift_v32i8'1566; AVX2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1567; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1568;1569; XOP-LABEL: 'constant_shift_v32i8'1570; XOP-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1571; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1572;1573; AVX512F-LABEL: 'constant_shift_v32i8'1574; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1575; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1576;1577; AVX512BW-LABEL: 'constant_shift_v32i8'1578; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1579; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1580;1581; AVX512VL-LABEL: 'constant_shift_v32i8'1582; AVX512VL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1583; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1584;1585; AVX512BWVL-LABEL: 'constant_shift_v32i8'1586; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1587; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1588;1589; SLM-LABEL: 'constant_shift_v32i8'1590; SLM-NEXT: Cost Model: Found costs of RThru:30 CodeSize:34 Lat:48 SizeLat:44 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1591; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1592;1593; AVX512GFNI-LABEL: 'constant_shift_v32i8'1594; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1595; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1596;1597 %shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1598 ret <32 x i8> %shift1599}1600 1601define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) {1602; SSE2-LABEL: 'constant_shift_v64i8'1603; SSE2-NEXT: Cost Model: Found costs of RThru:52 CodeSize:104 Lat:84 SizeLat:112 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1604; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1605;1606; SSE42-LABEL: 'constant_shift_v64i8'1607; SSE42-NEXT: Cost Model: Found costs of RThru:60 CodeSize:68 Lat:96 SizeLat:88 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1608; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1609;1610; AVX1-LABEL: 'constant_shift_v64i8'1611; AVX1-NEXT: Cost Model: Found costs of RThru:44 CodeSize:54 Lat:44 SizeLat:80 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1612; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1613;1614; AVX2-LABEL: 'constant_shift_v64i8'1615; AVX2-NEXT: Cost Model: Found costs of RThru:12 CodeSize:22 Lat:46 SizeLat:44 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1616; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1617;1618; XOP-LABEL: 'constant_shift_v64i8'1619; XOP-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1620; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1621;1622; AVX512F-LABEL: 'constant_shift_v64i8'1623; AVX512F-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1624; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1625;1626; AVX512BW-LABEL: 'constant_shift_v64i8'1627; AVX512BW-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1628; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1629;1630; AVX512VL-LABEL: 'constant_shift_v64i8'1631; AVX512VL-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1632; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1633;1634; AVX512BWVL-LABEL: 'constant_shift_v64i8'1635; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1636; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1637;1638; SLM-LABEL: 'constant_shift_v64i8'1639; SLM-NEXT: Cost Model: Found costs of RThru:60 CodeSize:68 Lat:96 SizeLat:88 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1640; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1641;1642; AVX512GFNI-LABEL: 'constant_shift_v64i8'1643; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1644; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift1645;1646 %shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>1647 ret <64 x i8> %shift1648}1649 1650;1651; Uniform Constant Shifts1652;1653 1654define <2 x i64> @splatconstant_shift_v2i64(<2 x i64> %a) {1655; SSE-LABEL: 'splatconstant_shift_v2i64'1656; SSE-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7)1657; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1658;1659; AVX1-LABEL: 'splatconstant_shift_v2i64'1660; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %shift = shl <2 x i64> %a, splat (i64 7)1661; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1662;1663; AVX2-LABEL: 'splatconstant_shift_v2i64'1664; AVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7)1665; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1666;1667; XOPAVX1-LABEL: 'splatconstant_shift_v2i64'1668; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %shift = shl <2 x i64> %a, splat (i64 7)1669; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1670;1671; XOPAVX2-LABEL: 'splatconstant_shift_v2i64'1672; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7)1673; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1674;1675; AVX512-LABEL: 'splatconstant_shift_v2i64'1676; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7)1677; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift1678;1679 %shift = shl <2 x i64> %a, <i64 7, i64 7>1680 ret <2 x i64> %shift1681}1682 1683define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) {1684; SSE-LABEL: 'splatconstant_shift_v4i64'1685; SSE-NEXT: Cost Model: Found costs of 2 for: %shift = shl <4 x i64> %a, splat (i64 7)1686; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1687;1688; AVX1-LABEL: 'splatconstant_shift_v4i64'1689; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:6 SizeLat:5 for: %shift = shl <4 x i64> %a, splat (i64 7)1690; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1691;1692; AVX2-LABEL: 'splatconstant_shift_v4i64'1693; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i64> %a, splat (i64 7)1694; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1695;1696; XOPAVX1-LABEL: 'splatconstant_shift_v4i64'1697; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:6 SizeLat:5 for: %shift = shl <4 x i64> %a, splat (i64 7)1698; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1699;1700; XOPAVX2-LABEL: 'splatconstant_shift_v4i64'1701; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i64> %a, splat (i64 7)1702; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1703;1704; AVX512-LABEL: 'splatconstant_shift_v4i64'1705; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i64> %a, splat (i64 7)1706; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift1707;1708 %shift = shl <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>1709 ret <4 x i64> %shift1710}1711 1712define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) {1713; SSE-LABEL: 'splatconstant_shift_v8i64'1714; SSE-NEXT: Cost Model: Found costs of 4 for: %shift = shl <8 x i64> %a, splat (i64 7)1715; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1716;1717; AVX1-LABEL: 'splatconstant_shift_v8i64'1718; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:12 SizeLat:10 for: %shift = shl <8 x i64> %a, splat (i64 7)1719; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1720;1721; AVX2-LABEL: 'splatconstant_shift_v8i64'1722; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <8 x i64> %a, splat (i64 7)1723; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1724;1725; XOPAVX1-LABEL: 'splatconstant_shift_v8i64'1726; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:12 SizeLat:10 for: %shift = shl <8 x i64> %a, splat (i64 7)1727; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1728;1729; XOPAVX2-LABEL: 'splatconstant_shift_v8i64'1730; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <8 x i64> %a, splat (i64 7)1731; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1732;1733; AVX512-LABEL: 'splatconstant_shift_v8i64'1734; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i64> %a, splat (i64 7)1735; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift1736;1737 %shift = shl <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>1738 ret <8 x i64> %shift1739}1740 1741define <4 x i32> @splatconstant_shift_v4i32(<4 x i32> %a) {1742; SSE-LABEL: 'splatconstant_shift_v4i32'1743; SSE-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5)1744; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1745;1746; AVX1-LABEL: 'splatconstant_shift_v4i32'1747; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %shift = shl <4 x i32> %a, splat (i32 5)1748; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1749;1750; AVX2-LABEL: 'splatconstant_shift_v4i32'1751; AVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5)1752; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1753;1754; XOPAVX1-LABEL: 'splatconstant_shift_v4i32'1755; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %shift = shl <4 x i32> %a, splat (i32 5)1756; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1757;1758; XOPAVX2-LABEL: 'splatconstant_shift_v4i32'1759; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5)1760; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1761;1762; AVX512-LABEL: 'splatconstant_shift_v4i32'1763; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5)1764; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift1765;1766 %shift = shl <4 x i32> %a, <i32 5, i32 5, i32 5, i32 5>1767 ret <4 x i32> %shift1768}1769 1770define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) {1771; SSE-LABEL: 'splatconstant_shift_v8i32'1772; SSE-NEXT: Cost Model: Found costs of 2 for: %shift = shl <8 x i32> %a, splat (i32 5)1773; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1774;1775; AVX1-LABEL: 'splatconstant_shift_v8i32'1776; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:6 SizeLat:5 for: %shift = shl <8 x i32> %a, splat (i32 5)1777; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1778;1779; AVX2-LABEL: 'splatconstant_shift_v8i32'1780; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i32> %a, splat (i32 5)1781; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1782;1783; XOPAVX1-LABEL: 'splatconstant_shift_v8i32'1784; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:6 SizeLat:5 for: %shift = shl <8 x i32> %a, splat (i32 5)1785; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1786;1787; XOPAVX2-LABEL: 'splatconstant_shift_v8i32'1788; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i32> %a, splat (i32 5)1789; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1790;1791; AVX512-LABEL: 'splatconstant_shift_v8i32'1792; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i32> %a, splat (i32 5)1793; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift1794;1795 %shift = shl <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>1796 ret <8 x i32> %shift1797}1798 1799define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) {1800; SSE-LABEL: 'splatconstant_shift_v16i32'1801; SSE-NEXT: Cost Model: Found costs of 4 for: %shift = shl <16 x i32> %a, splat (i32 5)1802; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1803;1804; AVX1-LABEL: 'splatconstant_shift_v16i32'1805; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:12 SizeLat:10 for: %shift = shl <16 x i32> %a, splat (i32 5)1806; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1807;1808; AVX2-LABEL: 'splatconstant_shift_v16i32'1809; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i32> %a, splat (i32 5)1810; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1811;1812; XOPAVX1-LABEL: 'splatconstant_shift_v16i32'1813; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:12 SizeLat:10 for: %shift = shl <16 x i32> %a, splat (i32 5)1814; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1815;1816; XOPAVX2-LABEL: 'splatconstant_shift_v16i32'1817; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i32> %a, splat (i32 5)1818; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1819;1820; AVX512-LABEL: 'splatconstant_shift_v16i32'1821; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i32> %a, splat (i32 5)1822; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift1823;1824 %shift = shl <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>1825 ret <16 x i32> %shift1826}1827 1828define <8 x i16> @splatconstant_shift_v8i16(<8 x i16> %a) {1829; SSE-LABEL: 'splatconstant_shift_v8i16'1830; SSE-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3)1831; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1832;1833; AVX1-LABEL: 'splatconstant_shift_v8i16'1834; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %shift = shl <8 x i16> %a, splat (i16 3)1835; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1836;1837; AVX2-LABEL: 'splatconstant_shift_v8i16'1838; AVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3)1839; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1840;1841; XOPAVX1-LABEL: 'splatconstant_shift_v8i16'1842; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %shift = shl <8 x i16> %a, splat (i16 3)1843; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1844;1845; XOPAVX2-LABEL: 'splatconstant_shift_v8i16'1846; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3)1847; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1848;1849; AVX512-LABEL: 'splatconstant_shift_v8i16'1850; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3)1851; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift1852;1853 %shift = shl <8 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>1854 ret <8 x i16> %shift1855}1856 1857define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) {1858; SSE-LABEL: 'splatconstant_shift_v16i16'1859; SSE-NEXT: Cost Model: Found costs of 2 for: %shift = shl <16 x i16> %a, splat (i16 3)1860; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1861;1862; AVX1-LABEL: 'splatconstant_shift_v16i16'1863; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:6 SizeLat:5 for: %shift = shl <16 x i16> %a, splat (i16 3)1864; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1865;1866; AVX2-LABEL: 'splatconstant_shift_v16i16'1867; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <16 x i16> %a, splat (i16 3)1868; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1869;1870; XOPAVX1-LABEL: 'splatconstant_shift_v16i16'1871; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:6 SizeLat:5 for: %shift = shl <16 x i16> %a, splat (i16 3)1872; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1873;1874; XOPAVX2-LABEL: 'splatconstant_shift_v16i16'1875; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <16 x i16> %a, splat (i16 3)1876; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1877;1878; AVX512F-LABEL: 'splatconstant_shift_v16i16'1879; AVX512F-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:7 SizeLat:4 for: %shift = shl <16 x i16> %a, splat (i16 3)1880; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1881;1882; AVX512BW-LABEL: 'splatconstant_shift_v16i16'1883; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, splat (i16 3)1884; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1885;1886; AVX512VL-LABEL: 'splatconstant_shift_v16i16'1887; AVX512VL-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:7 SizeLat:4 for: %shift = shl <16 x i16> %a, splat (i16 3)1888; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1889;1890; AVX512BWVL-LABEL: 'splatconstant_shift_v16i16'1891; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, splat (i16 3)1892; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1893;1894; AVX512GFNI-LABEL: 'splatconstant_shift_v16i16'1895; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, splat (i16 3)1896; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift1897;1898 %shift = shl <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>1899 ret <16 x i16> %shift1900}1901 1902define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) {1903; SSE-LABEL: 'splatconstant_shift_v32i16'1904; SSE-NEXT: Cost Model: Found costs of 4 for: %shift = shl <32 x i16> %a, splat (i16 3)1905; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1906;1907; AVX1-LABEL: 'splatconstant_shift_v32i16'1908; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:12 SizeLat:10 for: %shift = shl <32 x i16> %a, splat (i16 3)1909; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1910;1911; AVX2-LABEL: 'splatconstant_shift_v32i16'1912; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <32 x i16> %a, splat (i16 3)1913; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1914;1915; XOPAVX1-LABEL: 'splatconstant_shift_v32i16'1916; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:12 SizeLat:10 for: %shift = shl <32 x i16> %a, splat (i16 3)1917; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1918;1919; XOPAVX2-LABEL: 'splatconstant_shift_v32i16'1920; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <32 x i16> %a, splat (i16 3)1921; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1922;1923; AVX512F-LABEL: 'splatconstant_shift_v32i16'1924; AVX512F-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:10 SizeLat:7 for: %shift = shl <32 x i16> %a, splat (i16 3)1925; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1926;1927; AVX512BW-LABEL: 'splatconstant_shift_v32i16'1928; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, splat (i16 3)1929; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1930;1931; AVX512VL-LABEL: 'splatconstant_shift_v32i16'1932; AVX512VL-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:10 SizeLat:7 for: %shift = shl <32 x i16> %a, splat (i16 3)1933; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1934;1935; AVX512BWVL-LABEL: 'splatconstant_shift_v32i16'1936; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, splat (i16 3)1937; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1938;1939; AVX512GFNI-LABEL: 'splatconstant_shift_v32i16'1940; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, splat (i16 3)1941; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift1942;1943 %shift = shl <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>1944 ret <32 x i16> %shift1945}1946 1947define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) {1948; SSE-LABEL: 'splatconstant_shift_v16i8'1949; SSE-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:7 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1950; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1951;1952; AVX1-LABEL: 'splatconstant_shift_v16i8'1953; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:7 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1954; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1955;1956; AVX2-LABEL: 'splatconstant_shift_v16i8'1957; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1958; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1959;1960; XOPAVX1-LABEL: 'splatconstant_shift_v16i8'1961; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <16 x i8> %a, splat (i8 3)1962; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1963;1964; XOPAVX2-LABEL: 'splatconstant_shift_v16i8'1965; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1966; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1967;1968; AVX512F-LABEL: 'splatconstant_shift_v16i8'1969; AVX512F-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1970; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1971;1972; AVX512BW-LABEL: 'splatconstant_shift_v16i8'1973; AVX512BW-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:7 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1974; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1975;1976; AVX512VL-LABEL: 'splatconstant_shift_v16i8'1977; AVX512VL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1978; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1979;1980; AVX512BWVL-LABEL: 'splatconstant_shift_v16i8'1981; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:7 SizeLat:3 for: %shift = shl <16 x i8> %a, splat (i8 3)1982; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1983;1984; AVX512GFNI-LABEL: 'splatconstant_shift_v16i8'1985; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:6 SizeLat:2 for: %shift = shl <16 x i8> %a, splat (i8 3)1986; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift1987;1988 %shift = shl <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>1989 ret <16 x i8> %shift1990}1991 1992define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) {1993; SSE-LABEL: 'splatconstant_shift_v32i8'1994; SSE-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:14 SizeLat:6 for: %shift = shl <32 x i8> %a, splat (i8 3)1995; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift1996;1997; AVX1-LABEL: 'splatconstant_shift_v32i8'1998; AVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:7 Lat:7 SizeLat:8 for: %shift = shl <32 x i8> %a, splat (i8 3)1999; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2000;2001; AVX2-LABEL: 'splatconstant_shift_v32i8'2002; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <32 x i8> %a, splat (i8 3)2003; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2004;2005; XOPAVX1-LABEL: 'splatconstant_shift_v32i8'2006; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <32 x i8> %a, splat (i8 3)2007; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2008;2009; XOPAVX2-LABEL: 'splatconstant_shift_v32i8'2010; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <32 x i8> %a, splat (i8 3)2011; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2012;2013; AVX512F-LABEL: 'splatconstant_shift_v32i8'2014; AVX512F-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <32 x i8> %a, splat (i8 3)2015; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2016;2017; AVX512BW-LABEL: 'splatconstant_shift_v32i8'2018; AVX512BW-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <32 x i8> %a, splat (i8 3)2019; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2020;2021; AVX512VL-LABEL: 'splatconstant_shift_v32i8'2022; AVX512VL-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <32 x i8> %a, splat (i8 3)2023; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2024;2025; AVX512BWVL-LABEL: 'splatconstant_shift_v32i8'2026; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <32 x i8> %a, splat (i8 3)2027; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2028;2029; AVX512GFNI-LABEL: 'splatconstant_shift_v32i8'2030; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:6 SizeLat:2 for: %shift = shl <32 x i8> %a, splat (i8 3)2031; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift2032;2033 %shift = shl <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>2034 ret <32 x i8> %shift2035}2036 2037define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) {2038; SSE-LABEL: 'splatconstant_shift_v64i8'2039; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:8 Lat:28 SizeLat:12 for: %shift = shl <64 x i8> %a, splat (i8 3)2040; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2041;2042; AVX1-LABEL: 'splatconstant_shift_v64i8'2043; AVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:14 Lat:14 SizeLat:16 for: %shift = shl <64 x i8> %a, splat (i8 3)2044; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2045;2046; AVX2-LABEL: 'splatconstant_shift_v64i8'2047; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:16 SizeLat:8 for: %shift = shl <64 x i8> %a, splat (i8 3)2048; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2049;2050; XOPAVX1-LABEL: 'splatconstant_shift_v64i8'2051; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <64 x i8> %a, splat (i8 3)2052; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2053;2054; XOPAVX2-LABEL: 'splatconstant_shift_v64i8'2055; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:16 SizeLat:8 for: %shift = shl <64 x i8> %a, splat (i8 3)2056; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2057;2058; AVX512F-LABEL: 'splatconstant_shift_v64i8'2059; AVX512F-NEXT: Cost Model: Found costs of RThru:2 CodeSize:5 Lat:12 SizeLat:6 for: %shift = shl <64 x i8> %a, splat (i8 3)2060; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2061;2062; AVX512BW-LABEL: 'splatconstant_shift_v64i8'2063; AVX512BW-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <64 x i8> %a, splat (i8 3)2064; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2065;2066; AVX512VL-LABEL: 'splatconstant_shift_v64i8'2067; AVX512VL-NEXT: Cost Model: Found costs of RThru:2 CodeSize:5 Lat:12 SizeLat:6 for: %shift = shl <64 x i8> %a, splat (i8 3)2068; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2069;2070; AVX512BWVL-LABEL: 'splatconstant_shift_v64i8'2071; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:8 SizeLat:3 for: %shift = shl <64 x i8> %a, splat (i8 3)2072; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2073;2074; AVX512GFNI-LABEL: 'splatconstant_shift_v64i8'2075; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:6 SizeLat:2 for: %shift = shl <64 x i8> %a, splat (i8 3)2076; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift2077;2078 %shift = shl <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>2079 ret <64 x i8> %shift2080}2081 2082;2083; Special Cases2084;2085 2086; We always emit a single pmullw in the case of v8i16 vector shifts by2087; non-uniform constant.2088 2089define <8 x i16> @test1(<8 x i16> %a) {2090; SSE2-LABEL: 'test1'2091; SSE2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2092; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2093;2094; SSE42-LABEL: 'test1'2095; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2096; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2097;2098; AVX-LABEL: 'test1'2099; AVX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2100; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2101;2102; XOP-LABEL: 'test1'2103; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2104; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2105;2106; AVX512F-LABEL: 'test1'2107; AVX512F-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2108; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2109;2110; AVX512BW-LABEL: 'test1'2111; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2112; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2113;2114; AVX512VL-LABEL: 'test1'2115; AVX512VL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2116; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2117;2118; AVX512BWVL-LABEL: 'test1'2119; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2120; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2121;2122; SLM-LABEL: 'test1'2123; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2124; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2125;2126; AVX512GFNI-LABEL: 'test1'2127; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2128; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2129;2130 %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2131 ret <8 x i16> %shl2132}2133 2134define <8 x i16> @test2(<8 x i16> %a) {2135; SSE2-LABEL: 'test2'2136; SSE2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2137; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2138;2139; SSE42-LABEL: 'test2'2140; SSE42-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2141; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2142;2143; AVX-LABEL: 'test2'2144; AVX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2145; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2146;2147; XOP-LABEL: 'test2'2148; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2149; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2150;2151; AVX512F-LABEL: 'test2'2152; AVX512F-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2153; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2154;2155; AVX512BW-LABEL: 'test2'2156; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2157; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2158;2159; AVX512VL-LABEL: 'test2'2160; AVX512VL-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2161; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2162;2163; AVX512BWVL-LABEL: 'test2'2164; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2165; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2166;2167; SLM-LABEL: 'test2'2168; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2169; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2170;2171; AVX512GFNI-LABEL: 'test2'2172; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2173; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl2174;2175 %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1>2176 ret <8 x i16> %shl2177}2178 2179; With SSE4.1, v4i32 shifts can be lowered into a single pmulld instruction.2180; Make sure that the estimated cost is always 2 except for the case where2181; we only have SSE2 support. With SSE2, we are forced to special lower the2182; v4i32 mul as a 2x shuffle, 2x pmuludq, 2x shuffle.2183 2184define <4 x i32> @test3(<4 x i32> %a) {2185; SSE2-LABEL: 'test3'2186; SSE2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:7 Lat:8 SizeLat:7 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2187; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2188;2189; SSE42-LABEL: 'test3'2190; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:11 SizeLat:1 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2191; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2192;2193; AVX1-LABEL: 'test3'2194; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:3 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2195; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2196;2197; AVX2-LABEL: 'test3'2198; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:3 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2199; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2200;2201; XOP-LABEL: 'test3'2202; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2203; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2204;2205; AVX512-LABEL: 'test3'2206; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2207; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2208;2209; SLM-LABEL: 'test3'2210; SLM-NEXT: Cost Model: Found costs of RThru:11 CodeSize:1 Lat:11 SizeLat:7 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2211; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2212;2213 %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3>2214 ret <4 x i32> %shl2215}2216 2217define <4 x i32> @test4(<4 x i32> %a) {2218; SSE2-LABEL: 'test4'2219; SSE2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:7 Lat:8 SizeLat:7 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2220; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2221;2222; SSE42-LABEL: 'test4'2223; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:11 SizeLat:1 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2224; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2225;2226; AVX1-LABEL: 'test4'2227; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:3 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2228; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2229;2230; AVX2-LABEL: 'test4'2231; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:3 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2232; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2233;2234; XOP-LABEL: 'test4'2235; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2236; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2237;2238; AVX512-LABEL: 'test4'2239; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2240; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2241;2242; SLM-LABEL: 'test4'2243; SLM-NEXT: Cost Model: Found costs of RThru:11 CodeSize:1 Lat:11 SizeLat:7 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2244; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl2245;2246 %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1>2247 ret <4 x i32> %shl2248}2249 2250; On AVX2 we are able to lower the following shift into a single2251; vpsllvq. Therefore, the expected cost is only 1.2252; In all other cases, this shift is scalarized as the target does not support2253; vpsllv instructions.2254 2255define <2 x i64> @test5(<2 x i64> %a) {2256; SSE-LABEL: 'test5'2257; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:6 SizeLat:7 for: %shl = shl <2 x i64> %a, <i64 2, i64 3>2258; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl2259;2260; AVX1-LABEL: 'test5'2261; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:6 for: %shl = shl <2 x i64> %a, <i64 2, i64 3>2262; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl2263;2264; AVX2-LABEL: 'test5'2265; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shl = shl <2 x i64> %a, <i64 2, i64 3>2266; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl2267;2268; XOPAVX1-LABEL: 'test5'2269; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shl = shl <2 x i64> %a, <i64 2, i64 3>2270; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl2271;2272; XOPAVX2-LABEL: 'test5'2273; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shl = shl <2 x i64> %a, <i64 2, i64 3>2274; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl2275;2276; AVX512-LABEL: 'test5'2277; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <2 x i64> %a, <i64 2, i64 3>2278; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl2279;2280 %shl = shl <2 x i64> %a, <i64 2, i64 3>2281 ret <2 x i64> %shl2282}2283 2284; v16i16 and v8i32 shift left by non-uniform constant are lowered into2285; vector multiply instructions. With AVX (but not AVX2), the vector multiply2286; is lowered into a sequence of: 1 extract + 2 vpmullw + 1 insert.2287;2288; With AVX2, instruction vpmullw works with 256bit quantities and2289; therefore there is no need to split the resulting vector multiply into2290; a sequence of two multiply.2291;2292; With SSE2 and SSE4.1, the vector shift cost for 'test6' is twice2293; the cost computed in the case of 'test1'. That is because the backend2294; simply emits 2 pmullw with no extract/insert.2295 2296define <16 x i16> @test6(<16 x i16> %a) {2297; SSE2-LABEL: 'test6'2298; SSE2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:10 SizeLat:2 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2299; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2300;2301; SSE42-LABEL: 'test6'2302; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:10 SizeLat:2 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2303; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2304;2305; AVX1-LABEL: 'test6'2306; AVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:8 SizeLat:6 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2307; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2308;2309; AVX2-LABEL: 'test6'2310; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2311; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2312;2313; XOPAVX1-LABEL: 'test6'2314; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2315; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2316;2317; XOPAVX2-LABEL: 'test6'2318; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2319; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2320;2321; AVX512F-LABEL: 'test6'2322; AVX512F-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2323; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2324;2325; AVX512BW-LABEL: 'test6'2326; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2327; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2328;2329; AVX512VL-LABEL: 'test6'2330; AVX512VL-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:2 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2331; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2332;2333; AVX512BWVL-LABEL: 'test6'2334; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2335; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2336;2337; SLM-LABEL: 'test6'2338; SLM-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:10 SizeLat:2 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2339; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2340;2341; AVX512GFNI-LABEL: 'test6'2342; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2343; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl2344;2345 %shl = shl <16 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2346 ret <16 x i16> %shl2347}2348 2349; With SSE2 and SSE4.1, the vector shift cost for 'test7' is twice2350; the cost computed in the case of 'test3'. That is because the multiply2351; is type-legalized into two 4i32 vector multiply.2352 2353define <8 x i32> @test7(<8 x i32> %a) {2354; SSE2-LABEL: 'test7'2355; SSE2-NEXT: Cost Model: Found costs of RThru:12 CodeSize:14 Lat:16 SizeLat:14 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2356; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2357;2358; SSE42-LABEL: 'test7'2359; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:22 SizeLat:2 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2360; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2361;2362; AVX1-LABEL: 'test7'2363; AVX1-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:8 SizeLat:10 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2364; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2365;2366; AVX2-LABEL: 'test7'2367; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2368; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2369;2370; XOPAVX1-LABEL: 'test7'2371; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2372; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2373;2374; XOPAVX2-LABEL: 'test7'2375; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2376; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2377;2378; AVX512-LABEL: 'test7'2379; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2380; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2381;2382; SLM-LABEL: 'test7'2383; SLM-NEXT: Cost Model: Found costs of RThru:22 CodeSize:2 Lat:22 SizeLat:14 for: %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2384; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl2385;2386 %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2387 ret <8 x i32> %shl2388}2389 2390; On AVX2 we are able to lower the following shift into a single2391; vpsllvq. Therefore, the expected cost is only 1.2392; In all other cases, this shift is scalarized as the target does not support2393; vpsllv instructions.2394 2395define <4 x i64> @test8(<4 x i64> %a) {2396; SSE-LABEL: 'test8'2397; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:12 SizeLat:14 for: %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4>2398; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl2399;2400; AVX1-LABEL: 'test8'2401; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:7 SizeLat:15 for: %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4>2402; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl2403;2404; AVX2-LABEL: 'test8'2405; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4>2406; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl2407;2408; XOPAVX1-LABEL: 'test8'2409; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4>2410; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl2411;2412; XOPAVX2-LABEL: 'test8'2413; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4>2414; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl2415;2416; AVX512-LABEL: 'test8'2417; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4>2418; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl2419;2420 %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4>2421 ret <4 x i64> %shl2422}2423 2424; Same as 'test6', with the difference that the cost is double.2425 2426define <32 x i16> @test9(<32 x i16> %a) {2427; SSE2-LABEL: 'test9'2428; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:20 SizeLat:4 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2429; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2430;2431; SSE42-LABEL: 'test9'2432; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:20 SizeLat:4 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2433; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2434;2435; AVX1-LABEL: 'test9'2436; AVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:16 SizeLat:12 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2437; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2438;2439; AVX2-LABEL: 'test9'2440; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:10 SizeLat:4 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2441; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2442;2443; XOPAVX1-LABEL: 'test9'2444; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2445; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2446;2447; XOPAVX2-LABEL: 'test9'2448; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:10 SizeLat:4 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2449; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2450;2451; AVX512F-LABEL: 'test9'2452; AVX512F-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2453; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2454;2455; AVX512BW-LABEL: 'test9'2456; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2457; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2458;2459; AVX512VL-LABEL: 'test9'2460; AVX512VL-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2461; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2462;2463; AVX512BWVL-LABEL: 'test9'2464; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2465; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2466;2467; SLM-LABEL: 'test9'2468; SLM-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:20 SizeLat:4 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2469; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2470;2471; AVX512GFNI-LABEL: 'test9'2472; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2473; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl2474;2475 %shl = shl <32 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11, i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11>2476 ret <32 x i16> %shl2477}2478 2479; Same as 'test7', except that now the cost is double.2480 2481define <16 x i32> @test10(<16 x i32> %a) {2482; SSE2-LABEL: 'test10'2483; SSE2-NEXT: Cost Model: Found costs of RThru:24 CodeSize:28 Lat:32 SizeLat:28 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2484; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2485;2486; SSE42-LABEL: 'test10'2487; SSE42-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:44 SizeLat:4 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2488; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2489;2490; AVX1-LABEL: 'test10'2491; AVX1-NEXT: Cost Model: Found costs of RThru:10 CodeSize:10 Lat:16 SizeLat:20 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2492; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2493;2494; AVX2-LABEL: 'test10'2495; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2496; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2497;2498; XOPAVX1-LABEL: 'test10'2499; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2500; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2501;2502; XOPAVX2-LABEL: 'test10'2503; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2504; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2505;2506; AVX512-LABEL: 'test10'2507; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2508; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2509;2510; SLM-LABEL: 'test10'2511; SLM-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:44 SizeLat:28 for: %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2512; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl2513;2514 %shl = shl <16 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3>2515 ret <16 x i32> %shl2516}2517 2518; On AVX2 we are able to lower the following shift into a sequence of2519; two vpsllvq instructions. Therefore, the expected cost is only 2.2520; In all other cases, this shift is scalarized as we don't have vpsllv2521; instructions.2522 2523define <8 x i64> @test11(<8 x i64> %a) {2524; SSE-LABEL: 'test11'2525; SSE-NEXT: Cost Model: Found costs of RThru:16 CodeSize:20 Lat:24 SizeLat:28 for: %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3>2526; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl2527;2528; AVX1-LABEL: 'test11'2529; AVX1-NEXT: Cost Model: Found costs of RThru:12 CodeSize:22 Lat:14 SizeLat:30 for: %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3>2530; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl2531;2532; AVX2-LABEL: 'test11'2533; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3>2534; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl2535;2536; XOPAVX1-LABEL: 'test11'2537; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3>2538; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl2539;2540; XOPAVX2-LABEL: 'test11'2541; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3>2542; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl2543;2544; AVX512-LABEL: 'test11'2545; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3>2546; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl2547;2548 %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3>2549 ret <8 x i64> %shl2550}2551