blob: 723e3c27ad6ba739ca5bfde19d84f5c55b6815cb [file] [log] [blame]
Matt Arsenaultb2cb5f82016-07-09 07:55:03 +00001; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
Matt Arsenault0989d512014-06-26 17:22:30 +00002
Matt Arsenaultb2cb5f82016-07-09 07:55:03 +00003; GCN-LABEL: {{^}}test_default_si:
4; GCN: FloatMode: 192
5; GCN: IeeeMode: 0
6define void @test_default_si(float addrspace(1)* %out0, double addrspace(1)* %out1) #0 {
Matt Arsenault0989d512014-06-26 17:22:30 +00007 store float 0.0, float addrspace(1)* %out0
8 store double 0.0, double addrspace(1)* %out1
9 ret void
10}
Matt Arsenaultb2cb5f82016-07-09 07:55:03 +000011
12; GCN-LABEL: {{^}}test_default_vi:
13; GCN: FloatMode: 192
14; GCN: IeeeMode: 0
15define 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
18 ret void
19}
20
21; GCN-LABEL: {{^}}test_f64_denormals:
22; GCN: FloatMode: 192
23; GCN: IeeeMode: 0
24define 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
27 ret void
28}
29
30; GCN-LABEL: {{^}}test_f32_denormals:
31; GCNL: FloatMode: 48
32; GCN: IeeeMode: 0
33define 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
36 ret void
37}
38
39; GCN-LABEL: {{^}}test_f32_f64_denormals:
40; GCN: FloatMode: 240
41; GCN: IeeeMode: 0
42define 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
45 ret void
46}
47
48; GCN-LABEL: {{^}}test_no_denormals
49; GCN: FloatMode: 0
50; GCN: IeeeMode: 0
51define 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
54 ret void
55}
56
57attributes #0 = { nounwind "target-cpu"="tahiti" }
58attributes #1 = { nounwind "target-cpu"="fiji" }
59attributes #2 = { nounwind "target-features"="+fp64-denormals" }
60attributes #3 = { nounwind "target-features"="+fp32-denormals" }
61attributes #4 = { nounwind "target-features"="+fp32-denormals,+fp64-denormals" }
62attributes #5 = { nounwind "target-features"="-fp32-denormals,-fp64-denormals" }