Files
TheRock/compiler/amd-llvm/llvm/test/Analysis/CostModel/AMDGPU/shifts.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

357 lines
31 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 -mcpu=gfx900 -mattr=+half-rate-64-ops < %s | FileCheck -check-prefixes=FAST64 %s
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mattr=-half-rate-64-ops < %s | FileCheck -check-prefixes=SLOW64 %s
; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -mattr=+half-rate-64-ops < %s | FileCheck -check-prefixes=FAST64-SIZE %s
; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mattr=-half-rate-64-ops < %s | FileCheck -check-prefixes=SLOW64-SIZE %s
; END.
define amdgpu_kernel void @shl() #0 {
; FAST64-LABEL: 'shl'
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = shl i8 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = shl <2 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = shl <3 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = shl <4 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = shl <5 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = shl i16 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = shl <2 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i16 = shl <3 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16 = shl <4 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5i16 = shl <5 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = shl i32 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = shl <2 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = shl <3 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = shl <4 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = shl <5 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = shl i64 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = shl <2 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = shl <3 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = shl <4 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = shl <5 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; SLOW64-LABEL: 'shl'
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = shl i8 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = shl <2 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = shl <3 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = shl <4 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = shl <5 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = shl i16 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16 = shl <2 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i16 = shl <3 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i16 = shl <4 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i16 = shl <5 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = shl i32 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = shl <2 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = shl <3 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = shl <4 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = shl <5 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i64 = shl i64 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2i64 = shl <2 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v3i64 = shl <3 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4i64 = shl <4 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %v5i64 = shl <5 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; FAST64-SIZE-LABEL: 'shl'
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = shl i8 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = shl <2 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = shl <3 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = shl <4 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = shl <5 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = shl i16 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = shl <2 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i16 = shl <3 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16 = shl <4 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5i16 = shl <5 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = shl i32 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = shl <2 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = shl <3 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = shl <4 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = shl <5 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = shl i64 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = shl <2 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = shl <3 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = shl <4 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = shl <5 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
; SLOW64-SIZE-LABEL: 'shl'
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = shl i8 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = shl <2 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = shl <3 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = shl <4 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = shl <5 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = shl i16 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16 = shl <2 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i16 = shl <3 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i16 = shl <4 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i16 = shl <5 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = shl i32 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = shl <2 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = shl <3 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = shl <4 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = shl <5 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = shl i64 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = shl <2 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = shl <3 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = shl <4 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = shl <5 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%i8 = shl i8 poison, poison
%v2i8 = shl <2 x i8> poison, poison
%v3i8 = shl <3 x i8> poison, poison
%v4i8 = shl <4 x i8> poison, poison
%v5i8 = shl <5 x i8> poison, poison
%i16 = shl i16 poison, poison
%v2i16 = shl <2 x i16> poison, poison
%v3i16 = shl <3 x i16> poison, poison
%v4i16 = shl <4 x i16> poison, poison
%v5i16 = shl <5 x i16> poison, poison
%i32 = shl i32 poison, poison
%v2i32 = shl <2 x i32> poison, poison
%v3i32 = shl <3 x i32> poison, poison
%v4i32 = shl <4 x i32> poison, poison
%v5i32 = shl <5 x i32> poison, poison
%i64 = shl i64 poison, poison
%v2i64 = shl <2 x i64> poison, poison
%v3i64 = shl <3 x i64> poison, poison
%v4i64 = shl <4 x i64> poison, poison
%v5i64 = shl <5 x i64> poison, poison
ret void
}
define amdgpu_kernel void @lshr() #0 {
; FAST64-LABEL: 'lshr'
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = lshr i8 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = lshr <2 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = lshr <3 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = lshr <4 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = lshr <5 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = lshr i16 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = lshr <2 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i16 = lshr <3 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16 = lshr <4 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5i16 = lshr <5 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = lshr i32 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = lshr <2 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = lshr <3 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = lshr <4 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = lshr <5 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = lshr i64 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = lshr <2 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = lshr <3 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = lshr <4 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = lshr <5 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; SLOW64-LABEL: 'lshr'
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = lshr i8 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = lshr <2 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = lshr <3 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = lshr <4 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = lshr <5 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = lshr i16 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16 = lshr <2 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i16 = lshr <3 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i16 = lshr <4 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i16 = lshr <5 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = lshr i32 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = lshr <2 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = lshr <3 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = lshr <4 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = lshr <5 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i64 = lshr i64 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2i64 = lshr <2 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v3i64 = lshr <3 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4i64 = lshr <4 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %v5i64 = lshr <5 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; FAST64-SIZE-LABEL: 'lshr'
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = lshr i8 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = lshr <2 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = lshr <3 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = lshr <4 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = lshr <5 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = lshr i16 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = lshr <2 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i16 = lshr <3 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16 = lshr <4 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5i16 = lshr <5 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = lshr i32 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = lshr <2 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = lshr <3 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = lshr <4 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = lshr <5 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = lshr i64 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = lshr <2 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = lshr <3 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = lshr <4 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = lshr <5 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
; SLOW64-SIZE-LABEL: 'lshr'
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = lshr i8 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = lshr <2 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = lshr <3 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = lshr <4 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = lshr <5 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = lshr i16 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16 = lshr <2 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i16 = lshr <3 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i16 = lshr <4 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i16 = lshr <5 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = lshr i32 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = lshr <2 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = lshr <3 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = lshr <4 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = lshr <5 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = lshr i64 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = lshr <2 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = lshr <3 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = lshr <4 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = lshr <5 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%i8 = lshr i8 poison, poison
%v2i8 = lshr <2 x i8> poison, poison
%v3i8 = lshr <3 x i8> poison, poison
%v4i8 = lshr <4 x i8> poison, poison
%v5i8 = lshr <5 x i8> poison, poison
%i16 = lshr i16 poison, poison
%v2i16 = lshr <2 x i16> poison, poison
%v3i16 = lshr <3 x i16> poison, poison
%v4i16 = lshr <4 x i16> poison, poison
%v5i16 = lshr <5 x i16> poison, poison
%i32 = lshr i32 poison, poison
%v2i32 = lshr <2 x i32> poison, poison
%v3i32 = lshr <3 x i32> poison, poison
%v4i32 = lshr <4 x i32> poison, poison
%v5i32 = lshr <5 x i32> poison, poison
%i64 = lshr i64 poison, poison
%v2i64 = lshr <2 x i64> poison, poison
%v3i64 = lshr <3 x i64> poison, poison
%v4i64 = lshr <4 x i64> poison, poison
%v5i64 = lshr <5 x i64> poison, poison
ret void
}
define amdgpu_kernel void @ashr() #0 {
; FAST64-LABEL: 'ashr'
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = ashr i8 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = ashr <2 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = ashr <3 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = ashr <4 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = ashr <5 x i8> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = ashr i16 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = ashr <2 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i16 = ashr <3 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16 = ashr <4 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5i16 = ashr <5 x i16> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = ashr i32 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = ashr <2 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = ashr <3 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = ashr <4 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = ashr <5 x i32> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = ashr i64 poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = ashr <2 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = ashr <3 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = ashr <4 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = ashr <5 x i64> poison, poison
; FAST64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; SLOW64-LABEL: 'ashr'
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = ashr i8 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = ashr <2 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = ashr <3 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = ashr <4 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = ashr <5 x i8> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = ashr i16 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16 = ashr <2 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i16 = ashr <3 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i16 = ashr <4 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i16 = ashr <5 x i16> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = ashr i32 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = ashr <2 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = ashr <3 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = ashr <4 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = ashr <5 x i32> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i64 = ashr i64 poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2i64 = ashr <2 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v3i64 = ashr <3 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4i64 = ashr <4 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %v5i64 = ashr <5 x i64> poison, poison
; SLOW64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; FAST64-SIZE-LABEL: 'ashr'
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = ashr i8 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = ashr <2 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = ashr <3 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = ashr <4 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = ashr <5 x i8> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = ashr i16 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = ashr <2 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i16 = ashr <3 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16 = ashr <4 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5i16 = ashr <5 x i16> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = ashr i32 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = ashr <2 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = ashr <3 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = ashr <4 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = ashr <5 x i32> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = ashr i64 poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = ashr <2 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = ashr <3 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = ashr <4 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = ashr <5 x i64> poison, poison
; FAST64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
; SLOW64-SIZE-LABEL: 'ashr'
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = ashr i8 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8 = ashr <2 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i8 = ashr <3 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i8 = ashr <4 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i8 = ashr <5 x i8> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = ashr i16 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16 = ashr <2 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v3i16 = ashr <3 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i16 = ashr <4 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v5i16 = ashr <5 x i16> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i32 = ashr i32 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32 = ashr <2 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3i32 = ashr <3 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i32 = ashr <4 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v5i32 = ashr <5 x i32> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i64 = ashr i64 poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64 = ashr <2 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3i64 = ashr <3 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4i64 = ashr <4 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5i64 = ashr <5 x i64> poison, poison
; SLOW64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%i8 = ashr i8 poison, poison
%v2i8 = ashr <2 x i8> poison, poison
%v3i8 = ashr <3 x i8> poison, poison
%v4i8 = ashr <4 x i8> poison, poison
%v5i8 = ashr <5 x i8> poison, poison
%i16 = ashr i16 poison, poison
%v2i16 = ashr <2 x i16> poison, poison
%v3i16 = ashr <3 x i16> poison, poison
%v4i16 = ashr <4 x i16> poison, poison
%v5i16 = ashr <5 x i16> poison, poison
%i32 = ashr i32 poison, poison
%v2i32 = ashr <2 x i32> poison, poison
%v3i32 = ashr <3 x i32> poison, poison
%v4i32 = ashr <4 x i32> poison, poison
%v5i32 = ashr <5 x i32> poison, poison
%i64 = ashr i64 poison, poison
%v2i64 = ashr <2 x i64> poison, poison
%v3i64 = ashr <3 x i64> poison, poison
%v4i64 = ashr <4 x i64> poison, poison
%v5i64 = ashr <5 x i64> poison, poison
ret void
}
attributes #0 = { nounwind }