1 ; RUN: llc -mtriple=amdgcn--amdhsa -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 ; GCN-LABEL: {{^}}test_default_ci:
4 ; GCN: float_mode = 192
5 ; GCN: enable_dx10_clamp = 1
6 ; GCN: enable_ieee_mode = 1
7 define amdgpu_kernel void @test_default_ci(float addrspace(1)* %out0, double addrspace(1)* %out1) #0 {
8 store float 0.0, float addrspace(1)* %out0
9 store double 0.0, double addrspace(1)* %out1
13 ; GCN-LABEL: {{^}}test_default_vi:
14 ; GCN: float_mode = 192
15 ; GCN: enable_dx10_clamp = 1
16 ; GCN: enable_ieee_mode = 1
17 define amdgpu_kernel void @test_default_vi(float addrspace(1)* %out0, double addrspace(1)* %out1) #1 {
18 store float 0.0, float addrspace(1)* %out0
19 store double 0.0, double addrspace(1)* %out1
23 ; GCN-LABEL: {{^}}test_f64_denormals:
24 ; GCN: float_mode = 192
25 ; GCN: enable_dx10_clamp = 1
26 ; GCN: enable_ieee_mode = 1
27 define amdgpu_kernel void @test_f64_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #2 {
28 store float 0.0, float addrspace(1)* %out0
29 store double 0.0, double addrspace(1)* %out1
33 ; GCN-LABEL: {{^}}test_f32_denormals:
34 ; GCN: float_mode = 48
35 ; GCN: enable_dx10_clamp = 1
36 ; GCN: enable_ieee_mode = 1
37 define amdgpu_kernel void @test_f32_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #3 {
38 store float 0.0, float addrspace(1)* %out0
39 store double 0.0, double addrspace(1)* %out1
43 ; GCN-LABEL: {{^}}test_f32_f64_denormals:
44 ; GCN: float_mode = 240
45 ; GCN: enable_dx10_clamp = 1
46 ; GCN: enable_ieee_mode = 1
47 define amdgpu_kernel void @test_f32_f64_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #4 {
48 store float 0.0, float addrspace(1)* %out0
49 store double 0.0, double addrspace(1)* %out1
53 ; GCN-LABEL: {{^}}test_no_denormals:
55 ; GCN: enable_dx10_clamp = 1
56 ; GCN: enable_ieee_mode = 1
57 define amdgpu_kernel void @test_no_denormals(float addrspace(1)* %out0, double addrspace(1)* %out1) #5 {
58 store float 0.0, float addrspace(1)* %out0
59 store double 0.0, double addrspace(1)* %out1
63 ; GCN-LABEL: {{^}}test_no_dx10_clamp_vi:
64 ; GCN: float_mode = 192
65 ; GCN: enable_dx10_clamp = 0
66 ; GCN: enable_ieee_mode = 1
67 define amdgpu_kernel void @test_no_dx10_clamp_vi(float addrspace(1)* %out0, double addrspace(1)* %out1) #6 {
68 store float 0.0, float addrspace(1)* %out0
69 store double 0.0, double addrspace(1)* %out1
73 ; GCN-LABEL: {{^}}test_no_ieee_mode_vi:
74 ; GCN: float_mode = 192
75 ; GCN: enable_dx10_clamp = 1
76 ; GCN: enable_ieee_mode = 0
77 define amdgpu_kernel void @test_no_ieee_mode_vi(float addrspace(1)* %out0, double addrspace(1)* %out1) #7 {
78 store float 0.0, float addrspace(1)* %out0
79 store double 0.0, double addrspace(1)* %out1
83 ; GCN-LABEL: {{^}}test_no_ieee_mode_no_dx10_clamp_vi:
84 ; GCN: float_mode = 192
85 ; GCN: enable_dx10_clamp = 0
86 ; GCN: enable_ieee_mode = 0
87 define amdgpu_kernel void @test_no_ieee_mode_no_dx10_clamp_vi(float addrspace(1)* %out0, double addrspace(1)* %out1) #8 {
88 store float 0.0, float addrspace(1)* %out0
89 store double 0.0, double addrspace(1)* %out1
93 attributes #0 = { nounwind "target-cpu"="kaveri" "target-features"="-code-object-v3" }
94 attributes #1 = { nounwind "target-cpu"="fiji" "target-features"="-code-object-v3" }
95 attributes #2 = { nounwind "target-features"="-code-object-v3,-fp32-denormals,+fp64-fp16-denormals" }
96 attributes #3 = { nounwind "target-features"="-code-object-v3,+fp32-denormals,-fp64-fp16-denormals" }
97 attributes #4 = { nounwind "target-features"="-code-object-v3,+fp32-denormals,+fp64-fp16-denormals" }
98 attributes #5 = { nounwind "target-features"="-code-object-v3,-fp32-denormals,-fp64-fp16-denormals" }
99 attributes #6 = { nounwind "amdgpu-dx10-clamp"="false" "target-cpu"="fiji" "target-features"="-code-object-v3" }
100 attributes #7 = { nounwind "amdgpu-ieee"="false" "target-cpu"="fiji" "target-features"="-code-object-v3" }
101 attributes #8 = { nounwind "amdgpu-dx10-clamp"="false" "amdgpu-ieee"="false" "target-cpu"="fiji" "target-features"="-code-object-v3" }