1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s 2; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx900 -filetype=obj -o %t.o < %s && llvm-readobj -relocations %t.o | FileCheck --check-prefix=ELF %s 3; GCN-LABEL: {{^}}ps_main: 4; GCN: v_mov_b32_{{.*}} v[[relocreg:[0-9]+]], doff_0_0_b@abs32@lo 5; GCN-NEXT: exp {{.*}} v[[relocreg]], {{.*}} 6; GCN-NEXT: s_endpgm 7; GCN-NEXT: .Lfunc_end 8 9; ELF: Relocations [ 10; ELF-NEXT: Section (3) .rel.text { 11; ELF-NEXT: 0x{{[0-9]+}} R_AMDGPU_ABS32 doff_0_0_b {{.*}} 12 13define amdgpu_ps void @ps_main(i32 %arg, i32 inreg %arg1, i32 inreg %arg2) local_unnamed_addr #0 { 14 %rc = call i32 @llvm.amdgcn.reloc.constant(metadata !1) 15 %rcf = bitcast i32 %rc to float 16 call void @llvm.amdgcn.exp.f32(i32 immarg 40, i32 immarg 15, float %rcf, float undef, float undef, float undef, i1 immarg false, i1 immarg false) #0 17 ret void 18} 19 20; Function Attrs: inaccessiblememonly nounwind 21declare void @llvm.amdgcn.exp.f32(i32 immarg, i32 immarg, float, float, float, float, i1 immarg, i1 immarg) #1 22 23; Function Attrs: nounwind readnone speculatable 24declare i32 @llvm.amdgcn.reloc.constant(metadata) #2 25 26attributes #0 = { nounwind } 27attributes #1 = { inaccessiblememonly nounwind } 28attributes #2 = { nounwind readnone speculatable } 29 30!1 = !{!"doff_0_0_b"} 31