1 ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -stop-after=irtranslator -global-isel %s -o - | FileCheck %s
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]]
7 define 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
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]]
15 define 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
20 ; CHECK-LABEL: name: test_ptr2_byval
21 ; CHECK: [[S01:%[0-9]+]]:_(p4) = COPY $sgpr0_sgpr1
22 ; CHECK: G_LOAD [[S01]]
23 define amdgpu_vs void @test_ptr2_byval(i32 addrspace(4)* byval %arg0) {
24 %tmp0 = load volatile i32, i32 addrspace(4)* %arg0
28 ; CHECK-LABEL: name: test_ptr2_inreg
29 ; CHECK: [[S01:%[0-9]+]]:_(p4) = COPY $sgpr0_sgpr1
30 ; CHECK: G_LOAD [[S01]]
31 define amdgpu_vs void @test_ptr2_inreg(i32 addrspace(4)* inreg %arg0) {
32 %tmp0 = load volatile i32, i32 addrspace(4)* %arg0
36 ; CHECK-LABEL: name: test_sgpr_alignment0
37 ; CHECK: [[S0:%[0-9]+]]:_(s32) = COPY $sgpr0
38 ; CHECK: [[S23:%[0-9]+]]:_(p4) = 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]]
41 define amdgpu_vs void @test_sgpr_alignment0(float inreg %arg0, i32 addrspace(4)* inreg %arg1) {
42 %tmp0 = load volatile i32, i32 addrspace(4)* %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
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]](s32), [[S0]](s32), [[V1]](s32), [[S1]](s32)
53 define 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
58 declare void @llvm.amdgcn.exp.f32(i32, i32, float, float, float, float, i1, i1) #0
60 attributes #0 = { nounwind }