1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 ; GCN-LABEL: {{^}}test_default_si:
6 define amdgpu_kernel void @test_default_si(float addrspace(1)* %out0, double addrspace(1)* %out1) #0 {
7 store float 0.0, float addrspace(1)* %out0
8 store double 0.0, double addrspace(1)* %out1
12 ; GCN-LABEL: {{^}}test_default_vi:
15 define amdgpu_kernel void @test_default_vi(float addrspace(1)* %out0, double addrspace(1)* %out1) #1 {
16 store float 0.0, float addrspace(1)* %out0
17 store double 0.0, double addrspace(1)* %out1
21 ; GCN-LABEL: {{^}}test_f64_denormals:
24 define amdgpu_kernel void @test_f64_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #2 {
25 store float 0.0, float addrspace(1)* %out0
26 store double 0.0, double addrspace(1)* %out1
30 ; GCN-LABEL: {{^}}test_f32_denormals:
33 define amdgpu_kernel void @test_f32_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #3 {
34 store float 0.0, float addrspace(1)* %out0
35 store double 0.0, double addrspace(1)* %out1
39 ; GCN-LABEL: {{^}}test_f32_f64_denormals:
42 define amdgpu_kernel void @test_f32_f64_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #4 {
43 store float 0.0, float addrspace(1)* %out0
44 store double 0.0, double addrspace(1)* %out1
48 ; GCN-LABEL: {{^}}test_no_denormals
51 define amdgpu_kernel void @test_no_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #5 {
52 store float 0.0, float addrspace(1)* %out0
53 store double 0.0, double addrspace(1)* %out1
57 ; GCN-LABEL: {{^}}test_f16_f64_denormals:
60 define amdgpu_kernel void @test_f16_f64_denormals(half addrspace(1)* %out0, double addrspace(1)* %out1) #6 {
61 store half 0.0, half addrspace(1)* %out0
62 store double 0.0, double addrspace(1)* %out1
66 ; GCN-LABEL: {{^}}test_no_f16_f64_denormals:
69 define amdgpu_kernel void @test_no_f16_f64_denormals(half addrspace(1)* %out0, double addrspace(1)* %out1) #7 {
70 store half 0.0, half addrspace(1)* %out0
71 store double 0.0, double addrspace(1)* %out1
75 ; GCN-LABEL: {{^}}test_f32_f16_f64_denormals:
78 define amdgpu_kernel void @test_f32_f16_f64_denormals(half addrspace(1)* %out0, float addrspace(1)* %out1, double addrspace(1)* %out2) #8 {
79 store half 0.0, half addrspace(1)* %out0
80 store float 0.0, float addrspace(1)* %out1
81 store double 0.0, double addrspace(1)* %out2
85 ; GCN-LABEL: {{^}}kill_gs_const:
87 define amdgpu_gs void @kill_gs_const() {
89 %0 = icmp ule i32 0, 3
90 %1 = select i1 %0, float 1.000000e+00, float -1.000000e+00
91 call void @llvm.AMDGPU.kill(float %1)
92 %2 = icmp ule i32 3, 0
93 %3 = select i1 %2, float 1.000000e+00, float -1.000000e+00
94 call void @llvm.AMDGPU.kill(float %3)
98 ; GCN-LABEL: {{^}}kill_vcc_implicit_def:
100 define amdgpu_ps float @kill_vcc_implicit_def([6 x <16 x i8>] addrspace(2)* byval, [17 x <16 x i8>] addrspace(2)* byval, [17 x <4 x i32>] addrspace(2)* byval, [34 x <8 x i32>] addrspace(2)* byval, float inreg, i32 inreg, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, float, i32, float, float) {
102 %tmp0 = fcmp olt float %13, 0.0
103 call void @llvm.AMDGPU.kill(float %14)
104 %tmp1 = select i1 %tmp0, float 1.0, float 0.0
108 declare void @llvm.AMDGPU.kill(float)
110 attributes #0 = { nounwind "target-cpu"="tahiti" }
111 attributes #1 = { nounwind "target-cpu"="fiji" }
112 attributes #2 = { nounwind "target-features"="+fp64-denormals" }
113 attributes #3 = { nounwind "target-features"="+fp32-denormals" }
114 attributes #4 = { nounwind "target-features"="+fp32-denormals,+fp64-denormals" }
115 attributes #5 = { nounwind "target-features"="-fp32-denormals,-fp64-fp16-denormals" }
116 attributes #6 = { nounwind "target-features"="+fp64-fp16-denormals" }
117 attributes #7 = { nounwind "target-features"="-fp64-fp16-denormals" }
118 attributes #8 = { nounwind "target-features"="+fp32-denormals,+fp64-fp16-denormals" }