| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py |
| ; 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,SSE2 |
| ; 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,SSE42 |
| ; 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,AVX1 |
| ; 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,AVX2 |
| ; 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,XOPAVX1 |
| ; 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,XOPAVX2 |
| ; 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,AVX512F |
| ; 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,AVX512F |
| ; 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,AVX512BW |
| ; 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,AVX512F |
| ; 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,AVX512VL |
| ; 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,AVX512BWVL |
| ; |
| ; 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,SLM |
| ; 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,SSE42 |
| ; 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,AVX1 |
| ; 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,AVX512GFNI |
| |
| ; Verify the cost of vector shift left instructions. |
| |
| ; |
| ; Variable Shifts |
| ; |
| |
| define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) { |
| ; SSE-LABEL: 'var_shift_v2i64' |
| ; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:6 SizeLat:7 for: %shift = shl <2 x i64> %a, %b |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v2i64' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:2 CodeSize:4 Lat:4 SizeLat:6 for: %shift = shl <2 x i64> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v2i64' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'var_shift_v2i64' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, %b |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'var_shift_v2i64' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <2 x i64> %a, %b |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'var_shift_v2i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, %b |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| %shift = shl <2 x i64> %a, %b |
| ret <2 x i64> %shift |
| } |
| |
| define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) { |
| ; SSE-LABEL: 'var_shift_v4i64' |
| ; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:12 SizeLat:14 for: %shift = shl <4 x i64> %a, %b |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v4i64' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:7 SizeLat:15 for: %shift = shl <4 x i64> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v4i64' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'var_shift_v4i64' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <4 x i64> %a, %b |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'var_shift_v4i64' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %b |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'var_shift_v4i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i64> %a, %b |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| %shift = shl <4 x i64> %a, %b |
| ret <4 x i64> %shift |
| } |
| |
| define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) { |
| ; SSE-LABEL: 'var_shift_v8i64' |
| ; SSE-NEXT: Cost Model: Found costs of RThru:16 CodeSize:20 Lat:24 SizeLat:28 for: %shift = shl <8 x i64> %a, %b |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v8i64' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:12 CodeSize:22 Lat:14 SizeLat:30 for: %shift = shl <8 x i64> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v8i64' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'var_shift_v8i64' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <8 x i64> %a, %b |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'var_shift_v8i64' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %b |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'var_shift_v8i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i64> %a, %b |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| %shift = shl <8 x i64> %a, %b |
| ret <8 x i64> %shift |
| } |
| |
| define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) { |
| ; SSE2-LABEL: 'var_shift_v4i32' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:17 CodeSize:10 Lat:19 SizeLat:12 for: %shift = shl <4 x i32> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v4i32' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:14 CodeSize:4 Lat:20 SizeLat:10 for: %shift = shl <4 x i32> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v4i32' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:11 SizeLat:6 for: %shift = shl <4 x i32> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v4i32' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:3 SizeLat:3 for: %shift = shl <4 x i32> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; XOP-LABEL: 'var_shift_v4i32' |
| ; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <4 x i32> %a, %b |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'var_shift_v4i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, %b |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v4i32' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:14 CodeSize:4 Lat:20 SizeLat:10 for: %shift = shl <4 x i32> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| %shift = shl <4 x i32> %a, %b |
| ret <4 x i32> %shift |
| } |
| |
| define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) { |
| ; SSE2-LABEL: 'var_shift_v8i32' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:34 CodeSize:20 Lat:38 SizeLat:24 for: %shift = shl <8 x i32> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v8i32' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:28 CodeSize:8 Lat:40 SizeLat:20 for: %shift = shl <8 x i32> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v8i32' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:9 CodeSize:12 Lat:11 SizeLat:17 for: %shift = shl <8 x i32> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v8i32' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'var_shift_v8i32' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <8 x i32> %a, %b |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'var_shift_v8i32' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %b |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'var_shift_v8i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i32> %a, %b |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v8i32' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:28 CodeSize:8 Lat:40 SizeLat:20 for: %shift = shl <8 x i32> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| %shift = shl <8 x i32> %a, %b |
| ret <8 x i32> %shift |
| } |
| |
| define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) { |
| ; SSE2-LABEL: 'var_shift_v16i32' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:68 CodeSize:40 Lat:76 SizeLat:48 for: %shift = shl <16 x i32> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v16i32' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:56 CodeSize:16 Lat:80 SizeLat:40 for: %shift = shl <16 x i32> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v16i32' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:18 CodeSize:24 Lat:22 SizeLat:34 for: %shift = shl <16 x i32> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v16i32' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'var_shift_v16i32' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <16 x i32> %a, %b |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'var_shift_v16i32' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %b |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'var_shift_v16i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i32> %a, %b |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v16i32' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:56 CodeSize:16 Lat:80 SizeLat:40 for: %shift = shl <16 x i32> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| %shift = shl <16 x i32> %a, %b |
| ret <16 x i32> %shift |
| } |
| |
| define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) { |
| ; SSE2-LABEL: 'var_shift_v8i16' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:24 CodeSize:16 Lat:27 SizeLat:20 for: %shift = shl <8 x i16> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v8i16' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:14 SizeLat:11 for: %shift = shl <8 x i16> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v8i16' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:9 SizeLat:11 for: %shift = shl <8 x i16> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v8i16' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:18 SizeLat:10 for: %shift = shl <8 x i16> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; XOP-LABEL: 'var_shift_v8i16' |
| ; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <8 x i16> %a, %b |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'var_shift_v8i16' |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:18 SizeLat:10 for: %shift = shl <8 x i16> %a, %b |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'var_shift_v8i16' |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, %b |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'var_shift_v8i16' |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:18 SizeLat:10 for: %shift = shl <8 x i16> %a, %b |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'var_shift_v8i16' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, %b |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v8i16' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:14 SizeLat:11 for: %shift = shl <8 x i16> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'var_shift_v8i16' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, %b |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| %shift = shl <8 x i16> %a, %b |
| ret <8 x i16> %shift |
| } |
| |
| define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) { |
| ; SSE2-LABEL: 'var_shift_v16i16' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:48 CodeSize:32 Lat:54 SizeLat:40 for: %shift = shl <16 x i16> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v16i16' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:22 CodeSize:22 Lat:28 SizeLat:22 for: %shift = shl <16 x i16> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v16i16' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:13 CodeSize:24 Lat:16 SizeLat:25 for: %shift = shl <16 x i16> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v16i16' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:10 SizeLat:14 for: %shift = shl <16 x i16> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; XOP-LABEL: 'var_shift_v16i16' |
| ; XOP-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <16 x i16> %a, %b |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'var_shift_v16i16' |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:10 SizeLat:14 for: %shift = shl <16 x i16> %a, %b |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'var_shift_v16i16' |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, %b |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'var_shift_v16i16' |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:10 SizeLat:14 for: %shift = shl <16 x i16> %a, %b |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'var_shift_v16i16' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, %b |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v16i16' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:22 CodeSize:22 Lat:28 SizeLat:22 for: %shift = shl <16 x i16> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'var_shift_v16i16' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, %b |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| %shift = shl <16 x i16> %a, %b |
| ret <16 x i16> %shift |
| } |
| |
| define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) { |
| ; SSE2-LABEL: 'var_shift_v32i16' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:96 CodeSize:64 Lat:108 SizeLat:80 for: %shift = shl <32 x i16> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v32i16' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:44 CodeSize:44 Lat:56 SizeLat:44 for: %shift = shl <32 x i16> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v32i16' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:26 CodeSize:48 Lat:32 SizeLat:50 for: %shift = shl <32 x i16> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v32i16' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:16 CodeSize:20 Lat:20 SizeLat:28 for: %shift = shl <32 x i16> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; XOP-LABEL: 'var_shift_v32i16' |
| ; XOP-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <32 x i16> %a, %b |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'var_shift_v32i16' |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shift = shl <32 x i16> %a, %b |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'var_shift_v32i16' |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, %b |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'var_shift_v32i16' |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:11 CodeSize:11 Lat:16 SizeLat:15 for: %shift = shl <32 x i16> %a, %b |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'var_shift_v32i16' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, %b |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v32i16' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:44 CodeSize:44 Lat:56 SizeLat:44 for: %shift = shl <32 x i16> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'var_shift_v32i16' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, %b |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| %shift = shl <32 x i16> %a, %b |
| ret <32 x i16> %shift |
| } |
| |
| define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) { |
| ; SSE2-LABEL: 'var_shift_v16i8' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:13 CodeSize:26 Lat:21 SizeLat:28 for: %shift = shl <16 x i8> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v16i8' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:15 CodeSize:17 Lat:24 SizeLat:22 for: %shift = shl <16 x i8> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v16i8' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:10 CodeSize:11 Lat:21 SizeLat:17 for: %shift = shl <16 x i8> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v16i8' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; XOP-LABEL: 'var_shift_v16i8' |
| ; XOP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <16 x i8> %a, %b |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'var_shift_v16i8' |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, %b |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'var_shift_v16i8' |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, %b |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'var_shift_v16i8' |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:21 SizeLat:16 for: %shift = shl <16 x i8> %a, %b |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'var_shift_v16i8' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, %b |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v16i8' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:15 CodeSize:17 Lat:24 SizeLat:22 for: %shift = shl <16 x i8> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'var_shift_v16i8' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:5 for: %shift = shl <16 x i8> %a, %b |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| %shift = shl <16 x i8> %a, %b |
| ret <16 x i8> %shift |
| } |
| |
| define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) { |
| ; SSE2-LABEL: 'var_shift_v32i8' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:26 CodeSize:52 Lat:42 SizeLat:56 for: %shift = shl <32 x i8> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v32i8' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:30 CodeSize:34 Lat:48 SizeLat:44 for: %shift = shl <32 x i8> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v32i8' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:22 CodeSize:27 Lat:22 SizeLat:40 for: %shift = shl <32 x i8> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v32i8' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; XOP-LABEL: 'var_shift_v32i8' |
| ; XOP-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <32 x i8> %a, %b |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'var_shift_v32i8' |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, %b |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'var_shift_v32i8' |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, %b |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'var_shift_v32i8' |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:11 Lat:23 SizeLat:22 for: %shift = shl <32 x i8> %a, %b |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'var_shift_v32i8' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, %b |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v32i8' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:30 CodeSize:34 Lat:48 SizeLat:44 for: %shift = shl <32 x i8> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'var_shift_v32i8' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:11 Lat:23 SizeLat:16 for: %shift = shl <32 x i8> %a, %b |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| %shift = shl <32 x i8> %a, %b |
| ret <32 x i8> %shift |
| } |
| |
| define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) { |
| ; SSE2-LABEL: 'var_shift_v64i8' |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:52 CodeSize:104 Lat:84 SizeLat:112 for: %shift = shl <64 x i8> %a, %b |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'var_shift_v64i8' |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:60 CodeSize:68 Lat:96 SizeLat:88 for: %shift = shl <64 x i8> %a, %b |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'var_shift_v64i8' |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:44 CodeSize:54 Lat:44 SizeLat:80 for: %shift = shl <64 x i8> %a, %b |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'var_shift_v64i8' |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:12 CodeSize:22 Lat:46 SizeLat:44 for: %shift = shl <64 x i8> %a, %b |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; XOP-LABEL: 'var_shift_v64i8' |
| ; XOP-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <64 x i8> %a, %b |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'var_shift_v64i8' |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %b |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'var_shift_v64i8' |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, %b |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'var_shift_v64i8' |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %b |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'var_shift_v64i8' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, %b |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; SLM-LABEL: 'var_shift_v64i8' |
| ; SLM-NEXT: Cost Model: Found costs of RThru:60 CodeSize:68 Lat:96 SizeLat:88 for: %shift = shl <64 x i8> %a, %b |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'var_shift_v64i8' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:6 CodeSize:13 Lat:19 SizeLat:15 for: %shift = shl <64 x i8> %a, %b |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| %shift = shl <64 x i8> %a, %b |
| ret <64 x i8> %shift |
| } |
| |
| ; |
| ; Uniform Variable Shifts |
| ; |
| |
| define <2 x i64> @splatvar_shift_v2i64(<2 x i64> %a, i64 %b) { |
| ; SSE-LABEL: 'splatvar_shift_v2i64' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> undef, i64 %b, i32 0 |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer |
| ; SSE-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v2i64' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> undef, i64 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v2i64' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> undef, i64 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v2i64' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> undef, i64 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v2i64' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> undef, i64 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v2i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <2 x i64> undef, i64 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <2 x i64> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| %insert = insertelement <2 x i64> undef, i64 %b, i32 0 |
| %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer |
| %shift = shl <2 x i64> %a, %splat |
| ret <2 x i64> %shift |
| } |
| |
| define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) { |
| ; SSE-LABEL: 'splatvar_shift_v4i64' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer |
| ; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <4 x i64> %a, %splat |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v4i64' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:7 SizeLat:6 for: %shift = shl <4 x i64> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v4i64' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v4i64' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:4 Lat:7 SizeLat:6 for: %shift = shl <4 x i64> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v4i64' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v4i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i64> undef, i64 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <4 x i64> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| %insert = insertelement <4 x i64> undef, i64 %b, i32 0 |
| %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer |
| %shift = shl <4 x i64> %a, %splat |
| ret <4 x i64> %shift |
| } |
| |
| define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) { |
| ; SSE-LABEL: 'splatvar_shift_v8i64' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer |
| ; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <8 x i64> %a, %splat |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v8i64' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:14 SizeLat:12 for: %shift = shl <8 x i64> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v8i64' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v8i64' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:8 Lat:14 SizeLat:12 for: %shift = shl <8 x i64> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v8i64' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:8 SizeLat:4 for: %shift = shl <8 x i64> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v8i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i64> undef, i64 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:2 for: %shift = shl <8 x i64> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| %insert = insertelement <8 x i64> undef, i64 %b, i32 0 |
| %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer |
| %shift = shl <8 x i64> %a, %splat |
| ret <8 x i64> %shift |
| } |
| |
| define <4 x i32> @splatvar_shift_v4i32(<4 x i32> %a, i32 %b) { |
| ; SSE-LABEL: 'splatvar_shift_v4i32' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> undef, i32 %b, i32 0 |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer |
| ; SSE-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v4i32' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> undef, i32 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v4i32' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> undef, i32 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v4i32' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> undef, i32 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v4i32' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> undef, i32 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v4i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <4 x i32> undef, i32 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <4 x i32> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| %insert = insertelement <4 x i32> undef, i32 %b, i32 0 |
| %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer |
| %shift = shl <4 x i32> %a, %splat |
| ret <4 x i32> %shift |
| } |
| |
| define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) { |
| ; SSE-LABEL: 'splatvar_shift_v8i32' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer |
| ; SSE-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <8 x i32> %a, %splat |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v8i32' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <8 x i32> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v8i32' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v8i32' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <8 x i32> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v8i32' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v8i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i32> undef, i32 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <8 x i32> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| %insert = insertelement <8 x i32> undef, i32 %b, i32 0 |
| %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer |
| %shift = shl <8 x i32> %a, %splat |
| ret <8 x i32> %shift |
| } |
| |
| define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) { |
| ; SSE-LABEL: 'splatvar_shift_v16i32' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer |
| ; SSE-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <16 x i32> %a, %splat |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v16i32' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <16 x i32> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v16i32' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v16i32' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <16 x i32> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v16i32' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <16 x i32> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v16i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i32> undef, i32 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i32> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| %insert = insertelement <16 x i32> undef, i32 %b, i32 0 |
| %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer |
| %shift = shl <16 x i32> %a, %splat |
| ret <16 x i32> %shift |
| } |
| |
| define <8 x i16> @splatvar_shift_v8i16(<8 x i16> %a, i16 %b) { |
| ; SSE2-LABEL: 'splatvar_shift_v8i16' |
| ; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; SSE2-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'splatvar_shift_v8i16' |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v8i16' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v8i16' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v8i16' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v8i16' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v8i16' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; SLM-LABEL: 'splatvar_shift_v8i16' |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| ; SLM-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %shift = shl <8 x i16> %a, %splat |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| %insert = insertelement <8 x i16> undef, i16 %b, i32 0 |
| %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer |
| %shift = shl <8 x i16> %a, %splat |
| ret <8 x i16> %shift |
| } |
| |
| define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) { |
| ; SSE2-LABEL: 'splatvar_shift_v16i16' |
| ; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; SSE2-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i16> %a, %splat |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'splatvar_shift_v16i16' |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i16> %a, %splat |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v16i16' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 3 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <16 x i16> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v16i16' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i16> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v16i16' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 3 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:7 SizeLat:7 for: %shift = shl <16 x i16> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v16i16' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i16> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v16i16' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <16 x i16> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; SLM-LABEL: 'splatvar_shift_v16i16' |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| ; SLM-NEXT: Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %shift = shl <16 x i16> %a, %splat |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| %insert = insertelement <16 x i16> undef, i16 %b, i32 0 |
| %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer |
| %shift = shl <16 x i16> %a, %splat |
| ret <16 x i16> %shift |
| } |
| |
| define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) { |
| ; SSE2-LABEL: 'splatvar_shift_v32i16' |
| ; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; SSE2-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <32 x i16> %a, %splat |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'splatvar_shift_v32i16' |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <32 x i16> %a, %splat |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v32i16' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 3 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <32 x i16> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v32i16' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <32 x i16> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v32i16' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 3 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:6 CodeSize:10 Lat:14 SizeLat:14 for: %shift = shl <32 x i16> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v32i16' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:4 Lat:8 SizeLat:6 for: %shift = shl <32 x i16> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'splatvar_shift_v32i16' |
| ; AVX512F-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; AVX512F-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:10 SizeLat:7 for: %shift = shl <32 x i16> %a, %splat |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'splatvar_shift_v32i16' |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <32 x i16> %a, %splat |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'splatvar_shift_v32i16' |
| ; AVX512VL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; AVX512VL-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:5 CodeSize:5 Lat:10 SizeLat:7 for: %shift = shl <32 x i16> %a, %splat |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'splatvar_shift_v32i16' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <32 x i16> %a, %splat |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; SLM-LABEL: 'splatvar_shift_v32i16' |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; SLM-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %shift = shl <32 x i16> %a, %splat |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'splatvar_shift_v32i16' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:2 CodeSize:2 Lat:4 SizeLat:3 for: %shift = shl <32 x i16> %a, %splat |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| %insert = insertelement <32 x i16> undef, i16 %b, i32 0 |
| %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer |
| %shift = shl <32 x i16> %a, %splat |
| ret <32 x i16> %shift |
| } |
| |
| define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) { |
| ; SSE2-LABEL: 'splatvar_shift_v16i8' |
| ; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; SSE2-NEXT: Cost Model: Found costs of 3 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:9 CodeSize:6 Lat:10 SizeLat:9 for: %shift = shl <16 x i8> %a, %splat |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'splatvar_shift_v16i8' |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:9 CodeSize:6 Lat:10 SizeLat:9 for: %shift = shl <16 x i8> %a, %splat |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v16i8' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:8 for: %shift = shl <16 x i8> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v16i8' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:5 SizeLat:7 for: %shift = shl <16 x i8> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v16i8' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %shift = shl <16 x i8> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v16i8' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:5 SizeLat:7 for: %shift = shl <16 x i8> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v16i8' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:3 CodeSize:5 Lat:5 SizeLat:7 for: %shift = shl <16 x i8> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; SLM-LABEL: 'splatvar_shift_v16i8' |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| ; SLM-NEXT: Cost Model: Found costs of RThru:9 CodeSize:6 Lat:10 SizeLat:9 for: %shift = shl <16 x i8> %a, %splat |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| %insert = insertelement <16 x i8> undef, i8 %b, i32 0 |
| %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer |
| %shift = shl <16 x i8> %a, %splat |
| ret <16 x i8> %shift |
| } |
| |
| define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) { |
| ; SSE2-LABEL: 'splatvar_shift_v32i8' |
| ; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; SSE2-NEXT: Cost Model: Found costs of 3 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:18 CodeSize:12 Lat:20 SizeLat:18 for: %shift = shl <32 x i8> %a, %splat |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'splatvar_shift_v32i8' |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:18 CodeSize:12 Lat:20 SizeLat:18 for: %shift = shl <32 x i8> %a, %splat |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v32i8' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:7 CodeSize:11 Lat:8 SizeLat:14 for: %shift = shl <32 x i8> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v32i8' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <32 x i8> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v32i8' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:4 CodeSize:5 Lat:7 SizeLat:6 for: %shift = shl <32 x i8> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v32i8' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <32 x i8> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512-LABEL: 'splatvar_shift_v32i8' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <32 x i8> %a, %splat |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; SLM-LABEL: 'splatvar_shift_v32i8' |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| ; SLM-NEXT: Cost Model: Found costs of RThru:18 CodeSize:12 Lat:20 SizeLat:18 for: %shift = shl <32 x i8> %a, %splat |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| %insert = insertelement <32 x i8> undef, i8 %b, i32 0 |
| %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer |
| %shift = shl <32 x i8> %a, %splat |
| ret <32 x i8> %shift |
| } |
| |
| define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) { |
| ; SSE2-LABEL: 'splatvar_shift_v64i8' |
| ; SSE2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; SSE2-NEXT: Cost Model: Found costs of 3 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:36 CodeSize:24 Lat:40 SizeLat:36 for: %shift = shl <64 x i8> %a, %splat |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'splatvar_shift_v64i8' |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; SSE42-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:36 CodeSize:24 Lat:40 SizeLat:36 for: %shift = shl <64 x i8> %a, %splat |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'splatvar_shift_v64i8' |
| ; AVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; AVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:14 CodeSize:22 Lat:16 SizeLat:28 for: %shift = shl <64 x i8> %a, %splat |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'splatvar_shift_v64i8' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:12 Lat:14 SizeLat:16 for: %shift = shl <64 x i8> %a, %splat |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatvar_shift_v64i8' |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; XOPAVX1-NEXT: Cost Model: Found costs of 2 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:8 CodeSize:10 Lat:14 SizeLat:12 for: %shift = shl <64 x i8> %a, %splat |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatvar_shift_v64i8' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:8 CodeSize:12 Lat:14 SizeLat:16 for: %shift = shl <64 x i8> %a, %splat |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'splatvar_shift_v64i8' |
| ; AVX512F-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; AVX512F-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %splat |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'splatvar_shift_v64i8' |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <64 x i8> %a, %splat |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'splatvar_shift_v64i8' |
| ; AVX512VL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; AVX512VL-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:15 CodeSize:27 Lat:19 SizeLat:33 for: %shift = shl <64 x i8> %a, %splat |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'splatvar_shift_v64i8' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <64 x i8> %a, %splat |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; SLM-LABEL: 'splatvar_shift_v64i8' |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; SLM-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; SLM-NEXT: Cost Model: Found costs of RThru:36 CodeSize:24 Lat:40 SizeLat:36 for: %shift = shl <64 x i8> %a, %splat |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'splatvar_shift_v64i8' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:4 CodeSize:6 Lat:7 SizeLat:8 for: %shift = shl <64 x i8> %a, %splat |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| %insert = insertelement <64 x i8> undef, i8 %b, i32 0 |
| %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer |
| %shift = shl <64 x i8> %a, %splat |
| ret <64 x i8> %shift |
| } |
| |
| ; |
| ; Constant Shifts |
| ; |
| |
| define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) { |
| ; SSE-LABEL: 'constant_shift_v2i64' |
| ; 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> |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v2i64' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v2i64' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'constant_shift_v2i64' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'constant_shift_v2i64' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'constant_shift_v2i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, <i64 1, i64 7> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| %shift = shl <2 x i64> %a, <i64 1, i64 7> |
| ret <2 x i64> %shift |
| } |
| |
| define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) { |
| ; SSE-LABEL: 'constant_shift_v4i64' |
| ; 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> |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v4i64' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v4i64' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'constant_shift_v4i64' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'constant_shift_v4i64' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'constant_shift_v4i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| %shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31> |
| ret <4 x i64> %shift |
| } |
| |
| define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) { |
| ; SSE-LABEL: 'constant_shift_v8i64' |
| ; 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> |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v8i64' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v8i64' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'constant_shift_v8i64' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'constant_shift_v8i64' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'constant_shift_v8i64' |
| ; 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> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| %shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31> |
| ret <8 x i64> %shift |
| } |
| |
| define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) { |
| ; SSE2-LABEL: 'constant_shift_v4i32' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v4i32' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v4i32' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v4i32' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; XOP-LABEL: 'constant_shift_v4i32' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'constant_shift_v4i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v4i32' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| %shift = shl <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7> |
| ret <4 x i32> %shift |
| } |
| |
| define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) { |
| ; SSE2-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v8i32' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| %shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3> |
| ret <8 x i32> %shift |
| } |
| |
| define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) { |
| ; SSE2-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v16i32' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| %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> |
| ret <16 x i32> %shift |
| } |
| |
| define <8 x i16> @constant_shift_v8i16(<8 x i16> %a) { |
| ; SSE2-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; XOP-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'constant_shift_v8i16' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| %shift = shl <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7> |
| ret <8 x i16> %shift |
| } |
| |
| define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) { |
| ; SSE2-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'constant_shift_v16i16' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| %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> |
| ret <16 x i16> %shift |
| } |
| |
| define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) { |
| ; SSE2-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'constant_shift_v32i16' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| %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> |
| ret <32 x i16> %shift |
| } |
| |
| define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) { |
| ; SSE2-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; XOP-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'constant_shift_v16i8' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| %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> |
| ret <16 x i8> %shift |
| } |
| |
| define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) { |
| ; SSE2-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; XOP-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'constant_shift_v32i8' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| %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> |
| ret <32 x i8> %shift |
| } |
| |
| define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) { |
| ; SSE2-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; SSE42-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; XOP-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; SLM-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'constant_shift_v64i8' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| %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> |
| ret <64 x i8> %shift |
| } |
| |
| ; |
| ; Uniform Constant Shifts |
| ; |
| |
| define <2 x i64> @splatconstant_shift_v2i64(<2 x i64> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v2i64' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v2i64' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v2i64' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v2i64' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v2i64' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'splatconstant_shift_v2i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <2 x i64> %a, splat (i64 7) |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shift |
| ; |
| %shift = shl <2 x i64> %a, <i64 7, i64 7> |
| ret <2 x i64> %shift |
| } |
| |
| define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v4i64' |
| ; SSE-NEXT: Cost Model: Found costs of 2 for: %shift = shl <4 x i64> %a, splat (i64 7) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v4i64' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v4i64' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v4i64' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v4i64' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'splatconstant_shift_v4i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i64> %a, splat (i64 7) |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shift |
| ; |
| %shift = shl <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7> |
| ret <4 x i64> %shift |
| } |
| |
| define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v8i64' |
| ; SSE-NEXT: Cost Model: Found costs of 4 for: %shift = shl <8 x i64> %a, splat (i64 7) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v8i64' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v8i64' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v8i64' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v8i64' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| ; AVX512-LABEL: 'splatconstant_shift_v8i64' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i64> %a, splat (i64 7) |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shift |
| ; |
| %shift = shl <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7> |
| ret <8 x i64> %shift |
| } |
| |
| define <4 x i32> @splatconstant_shift_v4i32(<4 x i32> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v4i32' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v4i32' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v4i32' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v4i32' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v4i32' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'splatconstant_shift_v4i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <4 x i32> %a, splat (i32 5) |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shift |
| ; |
| %shift = shl <4 x i32> %a, <i32 5, i32 5, i32 5, i32 5> |
| ret <4 x i32> %shift |
| } |
| |
| define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v8i32' |
| ; SSE-NEXT: Cost Model: Found costs of 2 for: %shift = shl <8 x i32> %a, splat (i32 5) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v8i32' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v8i32' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v8i32' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v8i32' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'splatconstant_shift_v8i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i32> %a, splat (i32 5) |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shift |
| ; |
| %shift = shl <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5> |
| ret <8 x i32> %shift |
| } |
| |
| define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v16i32' |
| ; SSE-NEXT: Cost Model: Found costs of 4 for: %shift = shl <16 x i32> %a, splat (i32 5) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v16i32' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v16i32' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v16i32' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v16i32' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| ; AVX512-LABEL: 'splatconstant_shift_v16i32' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i32> %a, splat (i32 5) |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shift |
| ; |
| %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> |
| ret <16 x i32> %shift |
| } |
| |
| define <8 x i16> @splatconstant_shift_v8i16(<8 x i16> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v8i16' |
| ; SSE-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v8i16' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v8i16' |
| ; AVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v8i16' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v8i16' |
| ; XOPAVX2-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| ; AVX512-LABEL: 'splatconstant_shift_v8i16' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shift = shl <8 x i16> %a, splat (i16 3) |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shift |
| ; |
| %shift = shl <8 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3> |
| ret <8 x i16> %shift |
| } |
| |
| define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v16i16' |
| ; SSE-NEXT: Cost Model: Found costs of 2 for: %shift = shl <16 x i16> %a, splat (i16 3) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v16i16' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v16i16' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v16i16' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v16i16' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'splatconstant_shift_v16i16' |
| ; 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) |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'splatconstant_shift_v16i16' |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, splat (i16 3) |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'splatconstant_shift_v16i16' |
| ; 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) |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'splatconstant_shift_v16i16' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, splat (i16 3) |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'splatconstant_shift_v16i16' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <16 x i16> %a, splat (i16 3) |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shift |
| ; |
| %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> |
| ret <16 x i16> %shift |
| } |
| |
| define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v32i16' |
| ; SSE-NEXT: Cost Model: Found costs of 4 for: %shift = shl <32 x i16> %a, splat (i16 3) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v32i16' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v32i16' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v32i16' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v32i16' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512F-LABEL: 'splatconstant_shift_v32i16' |
| ; 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) |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BW-LABEL: 'splatconstant_shift_v32i16' |
| ; AVX512BW-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, splat (i16 3) |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512VL-LABEL: 'splatconstant_shift_v32i16' |
| ; 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) |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'splatconstant_shift_v32i16' |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, splat (i16 3) |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'splatconstant_shift_v32i16' |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of 1 for: %shift = shl <32 x i16> %a, splat (i16 3) |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shift |
| ; |
| %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> |
| ret <32 x i16> %shift |
| } |
| |
| define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'splatconstant_shift_v16i8' |
| ; 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) |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %shift |
| ; |
| %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> |
| ret <16 x i8> %shift |
| } |
| |
| define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'splatconstant_shift_v32i8' |
| ; 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) |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %shift |
| ; |
| %shift = shl <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3> |
| ret <32 x i8> %shift |
| } |
| |
| define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) { |
| ; SSE-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX1-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX2-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; XOPAVX1-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; XOPAVX2-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512F-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BW-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512VL-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512BWVL-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| ; AVX512GFNI-LABEL: 'splatconstant_shift_v64i8' |
| ; 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) |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <64 x i8> %shift |
| ; |
| %shift = shl <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3> |
| ret <64 x i8> %shift |
| } |
| |
| ; |
| ; Special Cases |
| ; |
| |
| ; We always emit a single pmullw in the case of v8i16 vector shifts by |
| ; non-uniform constant. |
| |
| define <8 x i16> @test1(<8 x i16> %a) { |
| ; SSE2-LABEL: 'test1' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; SSE42-LABEL: 'test1' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX-LABEL: 'test1' |
| ; 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> |
| ; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; XOP-LABEL: 'test1' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512F-LABEL: 'test1' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512BW-LABEL: 'test1' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512VL-LABEL: 'test1' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512BWVL-LABEL: 'test1' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; SLM-LABEL: 'test1' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512GFNI-LABEL: 'test1' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| %shl = shl <8 x i16> %a, <i16 1, i16 1, i16 2, i16 3, i16 7, i16 0, i16 9, i16 11> |
| ret <8 x i16> %shl |
| } |
| |
| define <8 x i16> @test2(<8 x i16> %a) { |
| ; SSE2-LABEL: 'test2' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; SSE42-LABEL: 'test2' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX-LABEL: 'test2' |
| ; 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> |
| ; AVX-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; XOP-LABEL: 'test2' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512F-LABEL: 'test2' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512BW-LABEL: 'test2' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512VL-LABEL: 'test2' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512BWVL-LABEL: 'test2' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; SLM-LABEL: 'test2' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| ; AVX512GFNI-LABEL: 'test2' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %shl |
| ; |
| %shl = shl <8 x i16> %a, <i16 0, i16 undef, i16 0, i16 0, i16 1, i16 undef, i16 -1, i16 1> |
| ret <8 x i16> %shl |
| } |
| |
| ; With SSE4.1, v4i32 shifts can be lowered into a single pmulld instruction. |
| ; Make sure that the estimated cost is always 2 except for the case where |
| ; we only have SSE2 support. With SSE2, we are forced to special lower the |
| ; v4i32 mul as a 2x shuffle, 2x pmuludq, 2x shuffle. |
| |
| define <4 x i32> @test3(<4 x i32> %a) { |
| ; SSE2-LABEL: 'test3' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; SSE42-LABEL: 'test3' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; AVX1-LABEL: 'test3' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; AVX2-LABEL: 'test3' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; XOP-LABEL: 'test3' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; AVX512-LABEL: 'test3' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; SLM-LABEL: 'test3' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| %shl = shl <4 x i32> %a, <i32 1, i32 -1, i32 2, i32 -3> |
| ret <4 x i32> %shl |
| } |
| |
| define <4 x i32> @test4(<4 x i32> %a) { |
| ; SSE2-LABEL: 'test4' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; SSE42-LABEL: 'test4' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; AVX1-LABEL: 'test4' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; AVX2-LABEL: 'test4' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; XOP-LABEL: 'test4' |
| ; 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> |
| ; XOP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; AVX512-LABEL: 'test4' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| ; SLM-LABEL: 'test4' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %shl |
| ; |
| %shl = shl <4 x i32> %a, <i32 0, i32 0, i32 1, i32 1> |
| ret <4 x i32> %shl |
| } |
| |
| ; On AVX2 we are able to lower the following shift into a single |
| ; vpsllvq. Therefore, the expected cost is only 1. |
| ; In all other cases, this shift is scalarized as the target does not support |
| ; vpsllv instructions. |
| |
| define <2 x i64> @test5(<2 x i64> %a) { |
| ; SSE-LABEL: 'test5' |
| ; 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> |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl |
| ; |
| ; AVX1-LABEL: 'test5' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl |
| ; |
| ; AVX2-LABEL: 'test5' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl |
| ; |
| ; XOPAVX1-LABEL: 'test5' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl |
| ; |
| ; XOPAVX2-LABEL: 'test5' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl |
| ; |
| ; AVX512-LABEL: 'test5' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <2 x i64> %a, <i64 2, i64 3> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %shl |
| ; |
| %shl = shl <2 x i64> %a, <i64 2, i64 3> |
| ret <2 x i64> %shl |
| } |
| |
| ; v16i16 and v8i32 shift left by non-uniform constant are lowered into |
| ; vector multiply instructions. With AVX (but not AVX2), the vector multiply |
| ; is lowered into a sequence of: 1 extract + 2 vpmullw + 1 insert. |
| ; |
| ; With AVX2, instruction vpmullw works with 256bit quantities and |
| ; therefore there is no need to split the resulting vector multiply into |
| ; a sequence of two multiply. |
| ; |
| ; With SSE2 and SSE4.1, the vector shift cost for 'test6' is twice |
| ; the cost computed in the case of 'test1'. That is because the backend |
| ; simply emits 2 pmullw with no extract/insert. |
| |
| define <16 x i16> @test6(<16 x i16> %a) { |
| ; SSE2-LABEL: 'test6' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; SSE42-LABEL: 'test6' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; AVX1-LABEL: 'test6' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; AVX2-LABEL: 'test6' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; XOPAVX1-LABEL: 'test6' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; XOPAVX2-LABEL: 'test6' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; AVX512F-LABEL: 'test6' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; AVX512BW-LABEL: 'test6' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; AVX512VL-LABEL: 'test6' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; AVX512BWVL-LABEL: 'test6' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; SLM-LABEL: 'test6' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| ; AVX512GFNI-LABEL: 'test6' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %shl |
| ; |
| %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> |
| ret <16 x i16> %shl |
| } |
| |
| ; With SSE2 and SSE4.1, the vector shift cost for 'test7' is twice |
| ; the cost computed in the case of 'test3'. That is because the multiply |
| ; is type-legalized into two 4i32 vector multiply. |
| |
| define <8 x i32> @test7(<8 x i32> %a) { |
| ; SSE2-LABEL: 'test7' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| ; SSE42-LABEL: 'test7' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| ; AVX1-LABEL: 'test7' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| ; AVX2-LABEL: 'test7' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| ; XOPAVX1-LABEL: 'test7' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| ; XOPAVX2-LABEL: 'test7' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| ; AVX512-LABEL: 'test7' |
| ; 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> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| ; SLM-LABEL: 'test7' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %shl |
| ; |
| %shl = shl <8 x i32> %a, <i32 1, i32 1, i32 2, i32 3, i32 1, i32 1, i32 2, i32 3> |
| ret <8 x i32> %shl |
| } |
| |
| ; On AVX2 we are able to lower the following shift into a single |
| ; vpsllvq. Therefore, the expected cost is only 1. |
| ; In all other cases, this shift is scalarized as the target does not support |
| ; vpsllv instructions. |
| |
| define <4 x i64> @test8(<4 x i64> %a) { |
| ; SSE-LABEL: 'test8' |
| ; 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> |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl |
| ; |
| ; AVX1-LABEL: 'test8' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl |
| ; |
| ; AVX2-LABEL: 'test8' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl |
| ; |
| ; XOPAVX1-LABEL: 'test8' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl |
| ; |
| ; XOPAVX2-LABEL: 'test8' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl |
| ; |
| ; AVX512-LABEL: 'test8' |
| ; AVX512-NEXT: Cost Model: Found costs of 1 for: %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %shl |
| ; |
| %shl = shl <4 x i64> %a, <i64 1, i64 2, i64 3, i64 4> |
| ret <4 x i64> %shl |
| } |
| |
| ; Same as 'test6', with the difference that the cost is double. |
| |
| define <32 x i16> @test9(<32 x i16> %a) { |
| ; SSE2-LABEL: 'test9' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; SSE42-LABEL: 'test9' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; AVX1-LABEL: 'test9' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; AVX2-LABEL: 'test9' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; XOPAVX1-LABEL: 'test9' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; XOPAVX2-LABEL: 'test9' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; AVX512F-LABEL: 'test9' |
| ; 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> |
| ; AVX512F-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; AVX512BW-LABEL: 'test9' |
| ; 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> |
| ; AVX512BW-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; AVX512VL-LABEL: 'test9' |
| ; 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> |
| ; AVX512VL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; AVX512BWVL-LABEL: 'test9' |
| ; 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> |
| ; AVX512BWVL-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; SLM-LABEL: 'test9' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| ; AVX512GFNI-LABEL: 'test9' |
| ; 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> |
| ; AVX512GFNI-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i16> %shl |
| ; |
| %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> |
| ret <32 x i16> %shl |
| } |
| |
| ; Same as 'test7', except that now the cost is double. |
| |
| define <16 x i32> @test10(<16 x i32> %a) { |
| ; SSE2-LABEL: 'test10' |
| ; 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> |
| ; SSE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| ; SSE42-LABEL: 'test10' |
| ; 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> |
| ; SSE42-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| ; AVX1-LABEL: 'test10' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| ; AVX2-LABEL: 'test10' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| ; XOPAVX1-LABEL: 'test10' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| ; XOPAVX2-LABEL: 'test10' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| ; AVX512-LABEL: 'test10' |
| ; 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> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| ; SLM-LABEL: 'test10' |
| ; 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> |
| ; SLM-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i32> %shl |
| ; |
| %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> |
| ret <16 x i32> %shl |
| } |
| |
| ; On AVX2 we are able to lower the following shift into a sequence of |
| ; two vpsllvq instructions. Therefore, the expected cost is only 2. |
| ; In all other cases, this shift is scalarized as we don't have vpsllv |
| ; instructions. |
| |
| define <8 x i64> @test11(<8 x i64> %a) { |
| ; SSE-LABEL: 'test11' |
| ; 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> |
| ; SSE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl |
| ; |
| ; AVX1-LABEL: 'test11' |
| ; 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> |
| ; AVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl |
| ; |
| ; AVX2-LABEL: 'test11' |
| ; 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> |
| ; AVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl |
| ; |
| ; XOPAVX1-LABEL: 'test11' |
| ; 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> |
| ; XOPAVX1-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl |
| ; |
| ; XOPAVX2-LABEL: 'test11' |
| ; 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> |
| ; XOPAVX2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl |
| ; |
| ; AVX512-LABEL: 'test11' |
| ; 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> |
| ; AVX512-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i64> %shl |
| ; |
| %shl = shl <8 x i64> %a, <i64 1, i64 1, i64 2, i64 3, i64 1, i64 1, i64 2, i64 3> |
| ret <8 x i64> %shl |
| } |