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
62 lines
2.5 KiB
LLVM
62 lines
2.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
|
|
; Check that no attributes are added to graphics functions
|
|
; RUN: opt -S -mtriple=amdgcn-amd-amdpal -passes=amdgpu-attributor %s | FileCheck -check-prefixes=ATTRIBUTOR_GCN %s
|
|
|
|
; Check that it doesn't crash
|
|
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9 %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10 %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -global-isel -new-reg-bank-select < %s | FileCheck -check-prefixes=GFX10 %s
|
|
|
|
define amdgpu_cs void @test_simple_indirect_call() {
|
|
; ATTRIBUTOR_GCN-LABEL: define {{[^@]+}}@test_simple_indirect_call() {
|
|
; ATTRIBUTOR_GCN-NEXT: [[PC:%.*]] = call i64 @llvm.amdgcn.s.getpc()
|
|
; ATTRIBUTOR_GCN-NEXT: [[FUN:%.*]] = inttoptr i64 [[PC]] to ptr
|
|
; ATTRIBUTOR_GCN-NEXT: call amdgpu_gfx void [[FUN]]()
|
|
; ATTRIBUTOR_GCN-NEXT: ret void
|
|
;
|
|
; Attributor adds work-group-size attribute. This should be ok.
|
|
; GFX9-LABEL: test_simple_indirect_call:
|
|
; GFX9: ; %bb.0:
|
|
; GFX9-NEXT: s_getpc_b64 s[8:9]
|
|
; GFX9-NEXT: s_mov_b32 s8, s0
|
|
; GFX9-NEXT: s_load_dwordx4 s[8:11], s[8:9], 0x10
|
|
; GFX9-NEXT: s_getpc_b64 s[4:5]
|
|
; GFX9-NEXT: s_mov_b32 s32, 0
|
|
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX9-NEXT: s_add_u32 s8, s8, s0
|
|
; GFX9-NEXT: s_addc_u32 s9, s9, 0
|
|
; GFX9-NEXT: s_mov_b64 s[0:1], s[8:9]
|
|
; GFX9-NEXT: s_mov_b64 s[2:3], s[10:11]
|
|
; GFX9-NEXT: s_swappc_b64 s[30:31], s[4:5]
|
|
; GFX9-NEXT: s_endpgm
|
|
; GFX10-LABEL: test_simple_indirect_call:
|
|
; GFX10: ; %bb.0:
|
|
; GFX10-NEXT: s_getpc_b64 s[8:9]
|
|
; GFX10-NEXT: s_mov_b32 s8, s0
|
|
; GFX10-NEXT: s_getpc_b64 s[4:5]
|
|
; GFX10-NEXT: s_load_dwordx4 s[8:11], s[8:9], 0x10
|
|
; GFX10-NEXT: s_mov_b32 s32, 0
|
|
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GFX10-NEXT: s_bitset0_b32 s11, 21
|
|
; GFX10-NEXT: s_add_u32 s8, s8, s0
|
|
; GFX10-NEXT: s_addc_u32 s9, s9, 0
|
|
; GFX10-NEXT: s_mov_b64 s[0:1], s[8:9]
|
|
; GFX10-NEXT: s_mov_b64 s[2:3], s[10:11]
|
|
; GFX10-NEXT: s_swappc_b64 s[30:31], s[4:5]
|
|
; GFX10-NEXT: s_endpgm
|
|
|
|
|
|
%pc = call i64 @llvm.amdgcn.s.getpc()
|
|
%fun = inttoptr i64 %pc to ptr
|
|
call amdgpu_gfx void %fun()
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: nounwind readnone speculatable willreturn
|
|
declare i64 @llvm.amdgcn.s.getpc() #0
|
|
|
|
attributes #0 = { nounwind readnone speculatable willreturn }
|
|
;.
|
|
; ATTRIBUTOR_GCN: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
|
|
;.
|