1; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -stop-after=irtranslator -global-isel %s -o - | FileCheck %s 2 3 4; CHECK-LABEL: name: test_f32_inreg 5; CHECK: [[S0:%[0-9]+]](s32) = COPY %sgpr0 6; CHECK: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.exp), %{{[0-9]+}}(s32), %{{[0-9]+}}(s32), [[S0]] 7define amdgpu_vs void @test_f32_inreg(float inreg %arg0) { 8 call void @llvm.amdgcn.exp.f32(i32 32, i32 15, float %arg0, float undef, float undef, float undef, i1 false, i1 false) #0 9 ret void 10} 11 12; CHECK-LABEL: name: test_f32 13; CHECK: [[V0:%[0-9]+]](s32) = COPY %vgpr0 14; CHECK: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.exp), %{{[0-9]+}}(s32), %{{[0-9]+}}(s32), [[V0]] 15define amdgpu_vs void @test_f32(float %arg0) { 16 call void @llvm.amdgcn.exp.f32(i32 32, i32 15, float %arg0, float undef, float undef, float undef, i1 false, i1 false) #0 17 ret void 18} 19 20; CHECK-LABEL: name: test_ptr2_byval 21; CHECK: [[S01:%[0-9]+]](p2) = COPY %sgpr0_sgpr1 22; CHECK: G_LOAD [[S01]] 23define amdgpu_vs void @test_ptr2_byval(i32 addrspace(2)* byval %arg0) { 24 %tmp0 = load volatile i32, i32 addrspace(2)* %arg0 25 ret void 26} 27 28; CHECK-LABEL: name: test_ptr2_inreg 29; CHECK: [[S01:%[0-9]+]](p2) = COPY %sgpr0_sgpr1 30; CHECK: G_LOAD [[S01]] 31define amdgpu_vs void @test_ptr2_inreg(i32 addrspace(2)* inreg %arg0) { 32 %tmp0 = load volatile i32, i32 addrspace(2)* %arg0 33 ret void 34} 35 36; CHECK-LABEL: name: test_sgpr_alignment0 37; CHECK: [[S0:%[0-9]+]](s32) = COPY %sgpr0 38; CHECK: [[S23:%[0-9]+]](p2) = COPY %sgpr2_sgpr3 39; CHECK: G_LOAD [[S23]] 40; CHECK: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.exp), %{{[0-9]+}}(s32), %{{[0-9]+}}(s32), [[S0]] 41define amdgpu_vs void @test_sgpr_alignment0(float inreg %arg0, i32 addrspace(2)* inreg %arg1) { 42 %tmp0 = load volatile i32, i32 addrspace(2)* %arg1 43 call void @llvm.amdgcn.exp.f32(i32 32, i32 15, float %arg0, float undef, float undef, float undef, i1 false, i1 false) #0 44 ret void 45} 46 47; CHECK-LABEL: name: test_order 48; CHECK: [[S0:%[0-9]+\(s32\)]] = COPY %sgpr0 49; CHECK: [[S1:%[0-9]+\(s32\)]] = COPY %sgpr1 50; CHECK: [[V0:%[0-9]+\(s32\)]] = COPY %vgpr0 51; CHECK: [[V1:%[0-9]+\(s32\)]] = COPY %vgpr1 52; CHECK: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.exp), %{{[0-9]+}}(s32), %{{[0-9]+}}(s32), [[V0]], [[S0]], [[V1]], [[S1]] 53define amdgpu_vs void @test_order(float inreg %arg0, float inreg %arg1, float %arg2, float %arg3) { 54 call void @llvm.amdgcn.exp.f32(i32 32, i32 15, float %arg2, float %arg0, float %arg3, float %arg1, i1 false, i1 false) #0 55 ret void 56} 57 58declare void @llvm.amdgcn.exp.f32(i32, i32, float, float, float, float, i1, i1) #0 59 60attributes #0 = { nounwind } 61