1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; Check that no attributes are added to graphics functions 3; RUN: opt -S -mtriple=amdgcn-amd-amdpal -amdgpu-annotate-kernel-features %s | FileCheck -check-prefix=GCN %s 4 5; Check that it doesn't crash 6; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX9 %s 7 8target datalayout = "A5" 9 10define amdgpu_cs void @test_simple_indirect_call() { 11; GCN-LABEL: define amdgpu_cs void @test_simple_indirect_call() { 12; GFX9-LABEL: test_simple_indirect_call: 13; GFX9: ; %bb.0: 14; GFX9-NEXT: s_getpc_b64 s[36:37] 15; GFX9-NEXT: s_mov_b32 s36, s0 16; GFX9-NEXT: s_getpc_b64 s[4:5] 17; GFX9-NEXT: s_load_dwordx4 s[36:39], s[36:37], 0x10 18; GFX9-NEXT: s_mov_b32 s32, 0 19; GFX9-NEXT: s_waitcnt lgkmcnt(0) 20; GFX9-NEXT: s_add_u32 s36, s36, s0 21; GFX9-NEXT: s_addc_u32 s37, s37, 0 22; GFX9-NEXT: s_mov_b64 s[0:1], s[36:37] 23; GFX9-NEXT: s_mov_b64 s[2:3], s[38:39] 24; GFX9-NEXT: s_swappc_b64 s[30:31], s[4:5] 25; GFX9-NEXT: s_endpgm 26 27 %pc = call i64 @llvm.amdgcn.s.getpc() 28 %fun = inttoptr i64 %pc to void()* 29 call amdgpu_gfx void %fun() 30 ret void 31} 32 33; Function Attrs: nounwind readnone speculatable willreturn 34declare i64 @llvm.amdgcn.s.getpc() #0 35 36attributes #0 = { nounwind readnone speculatable willreturn } 37