1; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,MOVREL %s
2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,MOVREL %s
3; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GPRIDX %s
4
5; GCN-LABEL: {{^}}main:
6
7; MOVREL: s_mov_b32 m0, s0
8; MOVREL-NEXT: v_movreld_b32_e32 v0,
9
10; GPRIDX: s_set_gpr_idx_on s0, gpr_idx(DST)
11; GPRIDX-NEXT: v_mov_b32_e32 v0, 1.0
12; GPRIDX-NEXT: s_set_gpr_idx_off
13
14; GCN-NEXT: v_mov_b32_e32 v0, v1
15; GCN-NEXT: ; return
16define amdgpu_ps float @main(i32 inreg %arg) #0 {
17main_body:
18  %tmp24 = insertelement <16 x float> zeroinitializer, float 1.000000e+00, i32 %arg
19  %tmp25 = extractelement <16 x float> %tmp24, i32 1
20  ret float %tmp25
21}
22
23attributes #0 = { "InitialPSInputAddr"="36983" }
24