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 %cmp0 = icmp ule i32 0, 3
90 call void @llvm.amdgcn.kill(i1 %cmp0)
91 %cmp1 = icmp ule i32 3, 0
92 call void @llvm.amdgcn.kill(i1 %cmp1)
96 ; GCN-LABEL: {{^}}kill_vcc_implicit_def:
98 define amdgpu_ps float @kill_vcc_implicit_def([6 x <16 x i8>] addrspace(4)* inreg, [17 x <16 x i8>] addrspace(4)* inreg, [17 x <4 x i32>] addrspace(4)* inreg, [34 x <8 x i32>] addrspace(4)* inreg, 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) {
100 %tmp0 = fcmp olt float %13, 0.0
101 call void @llvm.amdgcn.kill(i1 %tmp0)
102 %tmp1 = select i1 %tmp0, float 1.0, float 0.0
106 declare void @llvm.amdgcn.kill(i1)
108 attributes #0 = { nounwind "target-cpu"="tahiti" }
109 attributes #1 = { nounwind "target-cpu"="fiji" }
110 attributes #2 = { nounwind "target-features"="+fp64-denormals" }
111 attributes #3 = { nounwind "target-features"="+fp32-denormals" }
112 attributes #4 = { nounwind "target-features"="+fp32-denormals,+fp64-denormals" }
113 attributes #5 = { nounwind "target-features"="-fp32-denormals,-fp64-fp16-denormals" }
114 attributes #6 = { nounwind "target-features"="+fp64-fp16-denormals" }
115 attributes #7 = { nounwind "target-features"="-fp64-fp16-denormals" }
116 attributes #8 = { nounwind "target-features"="+fp32-denormals,+fp64-fp16-denormals" }