Files
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

109 lines
6.6 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck -check-prefixes=ALL %s
; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck -check-prefixes=ALL-SIZE %s
; END.
define ptr @ptrmask_p0_i64(ptr %ptr, i64 %mask) {
; ALL-LABEL: 'ptrmask_p0_i64'
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr @llvm.ptrmask.p0.i64(ptr %ptr, i64 %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret ptr %result
;
; ALL-SIZE-LABEL: 'ptrmask_p0_i64'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr @llvm.ptrmask.p0.i64(ptr %ptr, i64 %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr %result
;
%result = call ptr @llvm.ptrmask.p0.i64(ptr %ptr, i64 %mask)
ret ptr %result
}
define <2 x ptr> @ptrmask_v2p0_v2i64(<2 x ptr> %ptr, <2 x i64> %mask) {
; ALL-LABEL: 'ptrmask_v2p0_v2i64'
; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %result = call <2 x ptr> @llvm.ptrmask.v2p0.v2i64(<2 x ptr> %ptr, <2 x i64> %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret <2 x ptr> %result
;
; ALL-SIZE-LABEL: 'ptrmask_v2p0_v2i64'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %result = call <2 x ptr> @llvm.ptrmask.v2p0.v2i64(<2 x ptr> %ptr, <2 x i64> %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x ptr> %result
;
%result = call <2 x ptr> @llvm.ptrmask.v2p0.v2i64(<2 x ptr> %ptr, <2 x i64> %mask)
ret <2 x ptr> %result
}
define ptr addrspace(1) @ptrmask_p1_i64(ptr addrspace(1) %ptr, i64 %mask) {
; ALL-LABEL: 'ptrmask_p1_i64'
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr addrspace(1) @llvm.ptrmask.p1.i64(ptr addrspace(1) %ptr, i64 %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret ptr addrspace(1) %result
;
; ALL-SIZE-LABEL: 'ptrmask_p1_i64'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr addrspace(1) @llvm.ptrmask.p1.i64(ptr addrspace(1) %ptr, i64 %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr addrspace(1) %result
;
%result = call ptr addrspace(1) @llvm.ptrmask.p1.i64(ptr addrspace(1) %ptr, i64 %mask)
ret ptr addrspace(1) %result
}
define ptr addrspace(5) @ptrmask_p5_i32(ptr addrspace(5) %ptr, i32 %mask) {
; ALL-LABEL: 'ptrmask_p5_i32'
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr addrspace(5) @llvm.ptrmask.p5.i32(ptr addrspace(5) %ptr, i32 %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret ptr addrspace(5) %result
;
; ALL-SIZE-LABEL: 'ptrmask_p5_i32'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr addrspace(5) @llvm.ptrmask.p5.i32(ptr addrspace(5) %ptr, i32 %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr addrspace(5) %result
;
%result = call ptr addrspace(5) @llvm.ptrmask.p5.i32(ptr addrspace(5) %ptr, i32 %mask)
ret ptr addrspace(5) %result
}
define ptr addrspace(3) @ptrmask_p3_i32(ptr addrspace(3) %ptr, i32 %mask) {
; ALL-LABEL: 'ptrmask_p3_i32'
; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr addrspace(3) @llvm.ptrmask.p3.i32(ptr addrspace(3) %ptr, i32 %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret ptr addrspace(3) %result
;
; ALL-SIZE-LABEL: 'ptrmask_p3_i32'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %result = call ptr addrspace(3) @llvm.ptrmask.p3.i32(ptr addrspace(3) %ptr, i32 %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret ptr addrspace(3) %result
;
%result = call ptr addrspace(3) @llvm.ptrmask.p3.i32(ptr addrspace(3) %ptr, i32 %mask)
ret ptr addrspace(3) %result
}
define <2 x ptr addrspace(5)> @ptrmask_v2p5_v2i32(<2 x ptr addrspace(5)> %ptr, <2 x i32> %mask) {
; ALL-LABEL: 'ptrmask_v2p5_v2i32'
; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %result = call <2 x ptr addrspace(5)> @llvm.ptrmask.v2p5.v2i32(<2 x ptr addrspace(5)> %ptr, <2 x i32> %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret <2 x ptr addrspace(5)> %result
;
; ALL-SIZE-LABEL: 'ptrmask_v2p5_v2i32'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %result = call <2 x ptr addrspace(5)> @llvm.ptrmask.v2p5.v2i32(<2 x ptr addrspace(5)> %ptr, <2 x i32> %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x ptr addrspace(5)> %result
;
%result = call <2 x ptr addrspace(5)> @llvm.ptrmask.v2p5.v2i32(<2 x ptr addrspace(5)> %ptr, <2 x i32> %mask)
ret <2 x ptr addrspace(5)> %result
}
define <3 x ptr> @ptrmask_v3p0_v3i64(<3 x ptr> %ptr, <3 x i64> %mask) {
; ALL-LABEL: 'ptrmask_v3p0_v3i64'
; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %result = call <3 x ptr> @llvm.ptrmask.v3p0.v3i64(<3 x ptr> %ptr, <3 x i64> %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret <3 x ptr> %result
;
; ALL-SIZE-LABEL: 'ptrmask_v3p0_v3i64'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %result = call <3 x ptr> @llvm.ptrmask.v3p0.v3i64(<3 x ptr> %ptr, <3 x i64> %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <3 x ptr> %result
;
%result = call <3 x ptr> @llvm.ptrmask.v3p0.v3i64(<3 x ptr> %ptr, <3 x i64> %mask)
ret <3 x ptr> %result
}
define <3 x ptr addrspace(5)> @ptrmask_v3p5_v3i32(<3 x ptr addrspace(5)> %ptr, <3 x i32> %mask) {
; ALL-LABEL: 'ptrmask_v3p5_v3i32'
; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %result = call <3 x ptr addrspace(5)> @llvm.ptrmask.v3p5.v3i32(<3 x ptr addrspace(5)> %ptr, <3 x i32> %mask)
; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret <3 x ptr addrspace(5)> %result
;
; ALL-SIZE-LABEL: 'ptrmask_v3p5_v3i32'
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %result = call <3 x ptr addrspace(5)> @llvm.ptrmask.v3p5.v3i32(<3 x ptr addrspace(5)> %ptr, <3 x i32> %mask)
; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <3 x ptr addrspace(5)> %result
;
%result = call <3 x ptr addrspace(5)> @llvm.ptrmask.v3p5.v3i32(<3 x ptr addrspace(5)> %ptr, <3 x i32> %mask)
ret <3 x ptr addrspace(5)> %result
}