Files
TheRock/compiler/amd-llvm/llvm/test/Analysis/CostModel/AMDGPU/extractelement.ll
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

389 lines
34 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa %s | FileCheck -check-prefixes=GCN,CI %s
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=fiji %s | FileCheck -check-prefixes=GCN,GFX89 %s
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 %s | FileCheck -check-prefixes=GCN,GFX89 %s
; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa %s | FileCheck -check-prefixes=GCN-SIZE,CI-SIZE %s
; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=fiji %s | FileCheck -check-prefixes=GCN-SIZE,GFX89-SIZE %s
; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 %s | FileCheck -check-prefixes=GCN-SIZE,GFX89-SIZE %s
; END.
define amdgpu_kernel void @extractelement_32(i32 %arg) {
; GCN-LABEL: 'extractelement_32'
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = extractelement <2 x i32> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = extractelement <2 x float> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_0 = extractelement <3 x i32> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = extractelement <4 x i32> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_0 = extractelement <5 x i32> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_0 = extractelement <8 x i32> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = extractelement <2 x i32> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = extractelement <2 x float> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_1 = extractelement <3 x i32> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_1 = extractelement <4 x i32> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_1 = extractelement <5 x i32> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_1 = extractelement <8 x i32> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_2 = extractelement <3 x i32> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_2 = extractelement <4 x i32> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_2 = extractelement <5 x i32> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_2 = extractelement <8 x i32> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_3 = extractelement <4 x i32> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_3 = extractelement <5 x i32> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_3 = extractelement <8 x i32> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = extractelement <8 x i32> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GCN-SIZE-LABEL: 'extractelement_32'
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = extractelement <2 x i32> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = extractelement <2 x float> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_0 = extractelement <3 x i32> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = extractelement <4 x i32> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_0 = extractelement <5 x i32> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_0 = extractelement <8 x i32> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = extractelement <2 x i32> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = extractelement <2 x float> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_1 = extractelement <3 x i32> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_1 = extractelement <4 x i32> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_1 = extractelement <5 x i32> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_1 = extractelement <8 x i32> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_2 = extractelement <3 x i32> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_2 = extractelement <4 x i32> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_2 = extractelement <5 x i32> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_2 = extractelement <8 x i32> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_3 = extractelement <4 x i32> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_3 = extractelement <5 x i32> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_3 = extractelement <8 x i32> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = extractelement <8 x i32> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%v2i32_0 = extractelement <2 x i32> poison, i32 0
%v2f32_0 = extractelement <2 x float> poison, i32 0
%v3i32_0 = extractelement <3 x i32> poison, i32 0
%v4i32_0 = extractelement <4 x i32> poison, i32 0
%v5i32_0 = extractelement <5 x i32> poison, i32 0
%v8i32_0 = extractelement <8 x i32> poison, i32 0
%v2i32_1 = extractelement <2 x i32> poison, i32 1
%v2f32_1 = extractelement <2 x float> poison, i32 1
%v3i32_1 = extractelement <3 x i32> poison, i32 1
%v4i32_1 = extractelement <4 x i32> poison, i32 1
%v5i32_1 = extractelement <5 x i32> poison, i32 1
%v8i32_1 = extractelement <8 x i32> poison, i32 1
%v3i32_2 = extractelement <3 x i32> poison, i32 2
%v4i32_2 = extractelement <4 x i32> poison, i32 2
%v5i32_2 = extractelement <5 x i32> poison, i32 2
%v8i32_2 = extractelement <8 x i32> poison, i32 2
%v4i32_3 = extractelement <4 x i32> poison, i32 3
%v5i32_3 = extractelement <5 x i32> poison, i32 3
%v8i32_3 = extractelement <8 x i32> poison, i32 3
%v2i32_a = extractelement <2 x i32> poison, i32 %arg
%v4i32_a = extractelement <4 x i32> poison, i32 %arg
%v8i32_a = extractelement <8 x i32> poison, i32 %arg
ret void
}
define amdgpu_kernel void @extractelement_64(i32 %arg) {
; GCN-LABEL: 'extractelement_64'
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = extractelement <2 x i64> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = extractelement <2 x double> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_0 = extractelement <3 x i64> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = extractelement <4 x i64> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_0 = extractelement <5 x i64> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_0 = extractelement <8 x i64> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = extractelement <2 x i64> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = extractelement <2 x double> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_1 = extractelement <3 x i64> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_1 = extractelement <4 x i64> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_1 = extractelement <5 x i64> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_1 = extractelement <8 x i64> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_2 = extractelement <3 x i64> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_2 = extractelement <4 x i64> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_2 = extractelement <5 x i64> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_2 = extractelement <8 x i64> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_3 = extractelement <4 x i64> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_3 = extractelement <5 x i64> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_3 = extractelement <8 x i64> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = extractelement <4 x i64> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_a = extractelement <8 x i64> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GCN-SIZE-LABEL: 'extractelement_64'
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = extractelement <2 x i64> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = extractelement <2 x double> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_0 = extractelement <3 x i64> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = extractelement <4 x i64> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_0 = extractelement <5 x i64> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_0 = extractelement <8 x i64> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = extractelement <2 x i64> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = extractelement <2 x double> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_1 = extractelement <3 x i64> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_1 = extractelement <4 x i64> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_1 = extractelement <5 x i64> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_1 = extractelement <8 x i64> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_2 = extractelement <3 x i64> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_2 = extractelement <4 x i64> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_2 = extractelement <5 x i64> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_2 = extractelement <8 x i64> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_3 = extractelement <4 x i64> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_3 = extractelement <5 x i64> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_3 = extractelement <8 x i64> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = extractelement <4 x i64> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_a = extractelement <8 x i64> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%v2i64_0 = extractelement <2 x i64> poison, i32 0
%v2f64_0 = extractelement <2 x double> poison, i32 0
%v3i64_0 = extractelement <3 x i64> poison, i32 0
%v4i64_0 = extractelement <4 x i64> poison, i32 0
%v5i64_0 = extractelement <5 x i64> poison, i32 0
%v8i64_0 = extractelement <8 x i64> poison, i32 0
%v2i64_1 = extractelement <2 x i64> poison, i32 1
%v2f64_1 = extractelement <2 x double> poison, i32 1
%v3i64_1 = extractelement <3 x i64> poison, i32 1
%v4i64_1 = extractelement <4 x i64> poison, i32 1
%v5i64_1 = extractelement <5 x i64> poison, i32 1
%v8i64_1 = extractelement <8 x i64> poison, i32 1
%v3i64_2 = extractelement <3 x i64> poison, i32 2
%v4i64_2 = extractelement <4 x i64> poison, i32 2
%v5i64_2 = extractelement <5 x i64> poison, i32 2
%v8i64_2 = extractelement <8 x i64> poison, i32 2
%v4i64_3 = extractelement <4 x i64> poison, i32 3
%v5i64_3 = extractelement <5 x i64> poison, i32 3
%v8i64_3 = extractelement <8 x i64> poison, i32 3
%v2i64_a = extractelement <2 x i64> poison, i32 %arg
%v4i64_a = extractelement <4 x i64> poison, i32 %arg
%v8i64_a = extractelement <8 x i64> poison, i32 %arg
ret void
}
define amdgpu_kernel void @extractelement_8(i32 %arg) {
; GCN-LABEL: 'extractelement_8'
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_0 = extractelement <3 x i8> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i8_0 = extractelement <4 x i8> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_0 = extractelement <5 x i8> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i8_0 = extractelement <8 x i8> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_1 = extractelement <3 x i8> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = extractelement <4 x i8> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_1 = extractelement <5 x i8> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = extractelement <8 x i8> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_2 = extractelement <3 x i8> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_2 = extractelement <4 x i8> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_2 = extractelement <5 x i8> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_2 = extractelement <8 x i8> poison, i32 2
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_3 = extractelement <5 x i8> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_3 = extractelement <8 x i8> poison, i32 3
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_a = extractelement <2 x i8> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i8_0 = extractelement <16 x i8> poison, i32 0
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_1 = extractelement <16 x i8> poison, i32 1
; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i8_8 = extractelement <16 x i8> poison, i32 8
; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = extractelement <16 x i8> poison, i32 15
; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> poison, i32 %arg
; GCN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GCN-SIZE-LABEL: 'extractelement_8'
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_0 = extractelement <3 x i8> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i8_0 = extractelement <4 x i8> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_0 = extractelement <5 x i8> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i8_0 = extractelement <8 x i8> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_1 = extractelement <3 x i8> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = extractelement <4 x i8> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_1 = extractelement <5 x i8> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = extractelement <8 x i8> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_2 = extractelement <3 x i8> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_2 = extractelement <4 x i8> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_2 = extractelement <5 x i8> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_2 = extractelement <8 x i8> poison, i32 2
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_3 = extractelement <5 x i8> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_3 = extractelement <8 x i8> poison, i32 3
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_a = extractelement <2 x i8> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_a = extractelement <4 x i8> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_a = extractelement <8 x i8> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i8_0 = extractelement <16 x i8> poison, i32 0
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_1 = extractelement <16 x i8> poison, i32 1
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i8_8 = extractelement <16 x i8> poison, i32 8
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = extractelement <16 x i8> poison, i32 15
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_a = extractelement <16 x i8> poison, i32 %arg
; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%v2i8_0 = extractelement <2 x i8> poison, i32 0
%v3i8_0 = extractelement <3 x i8> poison, i32 0
%v4i8_0 = extractelement <4 x i8> poison, i32 0
%v5i8_0 = extractelement <5 x i8> poison, i32 0
%v8i8_0 = extractelement <8 x i8> poison, i32 0
%v2i8_1 = extractelement <2 x i8> poison, i32 1
%v3i8_1 = extractelement <3 x i8> poison, i32 1
%v4i8_1 = extractelement <4 x i8> poison, i32 1
%v5i8_1 = extractelement <5 x i8> poison, i32 1
%v8i8_1 = extractelement <8 x i8> poison, i32 1
%v3i8_2 = extractelement <3 x i8> poison, i32 2
%v4i8_2 = extractelement <4 x i8> poison, i32 2
%v5i8_2 = extractelement <5 x i8> poison, i32 2
%v8i8_2 = extractelement <8 x i8> poison, i32 2
%v4i8_3 = extractelement <4 x i8> poison, i32 3
%v5i8_3 = extractelement <5 x i8> poison, i32 3
%v8i8_3 = extractelement <8 x i8> poison, i32 3
%v2i8_a = extractelement <2 x i8> poison, i32 %arg
%v4i8_a = extractelement <4 x i8> poison, i32 %arg
%v8i8_a = extractelement <8 x i8> poison, i32 %arg
%v16i8_0 = extractelement <16 x i8> poison, i32 0
%v16i8_1 = extractelement <16 x i8> poison, i32 1
%v16i8_8 = extractelement <16 x i8> poison, i32 8
%v16i8_15 = extractelement <16 x i8> poison, i32 15
%v16i8_a = extractelement <16 x i8> poison, i32 %arg
ret void
}
define amdgpu_kernel void @extractelement_16(i32 %arg) {
; CI-LABEL: 'extractelement_16'
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> poison, i32 0
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = extractelement <2 x half> poison, i32 0
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_0 = extractelement <3 x i16> poison, i32 0
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> poison, i32 0
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_0 = extractelement <5 x i16> poison, i32 0
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> poison, i32 0
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> poison, i32 1
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> poison, i32 1
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> poison, i32 1
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> poison, i32 1
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> poison, i32 1
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> poison, i32 1
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> poison, i32 2
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> poison, i32 2
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> poison, i32 2
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> poison, i32 2
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> poison, i32 3
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> poison, i32 3
; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> poison, i32 3
; CI-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> poison, i32 %arg
; CI-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> poison, i32 %arg
; CI-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> poison, i32 %arg
; CI-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX89-LABEL: 'extractelement_16'
; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = extractelement <2 x i16> poison, i32 0
; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = extractelement <2 x half> poison, i32 0
; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i16_0 = extractelement <3 x i16> poison, i32 0
; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = extractelement <4 x i16> poison, i32 0
; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i16_0 = extractelement <5 x i16> poison, i32 0
; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_0 = extractelement <8 x i16> poison, i32 0
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> poison, i32 1
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> poison, i32 1
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> poison, i32 1
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> poison, i32 1
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> poison, i32 1
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> poison, i32 1
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> poison, i32 2
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> poison, i32 2
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> poison, i32 2
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> poison, i32 2
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> poison, i32 3
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> poison, i32 3
; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> poison, i32 3
; GFX89-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> poison, i32 %arg
; GFX89-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> poison, i32 %arg
; GFX89-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> poison, i32 %arg
; GFX89-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; CI-SIZE-LABEL: 'extractelement_16'
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> poison, i32 0
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = extractelement <2 x half> poison, i32 0
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_0 = extractelement <3 x i16> poison, i32 0
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> poison, i32 0
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_0 = extractelement <5 x i16> poison, i32 0
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> poison, i32 0
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> poison, i32 1
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> poison, i32 1
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> poison, i32 1
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> poison, i32 1
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> poison, i32 1
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> poison, i32 1
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> poison, i32 2
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> poison, i32 2
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> poison, i32 2
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> poison, i32 2
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> poison, i32 3
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> poison, i32 3
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> poison, i32 3
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> poison, i32 %arg
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> poison, i32 %arg
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> poison, i32 %arg
; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
; GFX89-SIZE-LABEL: 'extractelement_16'
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = extractelement <2 x i16> poison, i32 0
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = extractelement <2 x half> poison, i32 0
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i16_0 = extractelement <3 x i16> poison, i32 0
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = extractelement <4 x i16> poison, i32 0
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i16_0 = extractelement <5 x i16> poison, i32 0
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_0 = extractelement <8 x i16> poison, i32 0
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> poison, i32 1
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> poison, i32 1
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> poison, i32 1
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> poison, i32 1
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> poison, i32 1
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> poison, i32 1
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> poison, i32 2
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> poison, i32 2
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> poison, i32 2
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> poison, i32 2
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> poison, i32 3
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> poison, i32 3
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> poison, i32 3
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_a = extractelement <2 x i16> poison, i32 %arg
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_a = extractelement <4 x i16> poison, i32 %arg
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_a = extractelement <8 x i16> poison, i32 %arg
; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%v2i16_0 = extractelement <2 x i16> poison, i32 0
%v2f16_0 = extractelement <2 x half> poison, i32 0
%v3i16_0 = extractelement <3 x i16> poison, i32 0
%v4i16_0 = extractelement <4 x i16> poison, i32 0
%v5i16_0 = extractelement <5 x i16> poison, i32 0
%v8i16_0 = extractelement <8 x i16> poison, i32 0
%v2i16_1 = extractelement <2 x i16> poison, i32 1
%v2f16_1 = extractelement <2 x half> poison, i32 1
%v3i16_1 = extractelement <3 x i16> poison, i32 1
%v4i16_1 = extractelement <4 x i16> poison, i32 1
%v5i16_1 = extractelement <5 x i16> poison, i32 1
%v8i16_1 = extractelement <8 x i16> poison, i32 1
%v3i16_2 = extractelement <3 x i16> poison, i32 2
%v4i16_2 = extractelement <4 x i16> poison, i32 2
%v5i16_2 = extractelement <5 x i16> poison, i32 2
%v8i16_2 = extractelement <8 x i16> poison, i32 2
%v4i16_3 = extractelement <4 x i16> poison, i32 3
%v5i16_3 = extractelement <5 x i16> poison, i32 3
%v8i16_3 = extractelement <8 x i16> poison, i32 3
%v2i16_a = extractelement <2 x i16> poison, i32 %arg
%v4i16_a = extractelement <4 x i16> poison, i32 %arg
%v8i16_a = extractelement <8 x i16> poison, i32 %arg
ret void
}