Matt Arsenault | b2cb5f8 | 2016-07-09 07:55:03 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s |
Matt Arsenault | 0989d51 | 2014-06-26 17:22:30 +0000 | [diff] [blame] | 2 | |
Matt Arsenault | b2cb5f8 | 2016-07-09 07:55:03 +0000 | [diff] [blame] | 3 | ; GCN-LABEL: {{^}}test_default_si: |
| 4 | ; GCN: FloatMode: 192 |
| 5 | ; GCN: IeeeMode: 0 |
| 6 | define void @test_default_si(float addrspace(1)* %out0, double addrspace(1)* %out1) #0 { |
Matt Arsenault | 0989d51 | 2014-06-26 17:22:30 +0000 | [diff] [blame] | 7 | store float 0.0, float addrspace(1)* %out0 |
| 8 | store double 0.0, double addrspace(1)* %out1 |
| 9 | ret void |
| 10 | } |
Matt Arsenault | b2cb5f8 | 2016-07-09 07:55:03 +0000 | [diff] [blame] | 11 | |
| 12 | ; GCN-LABEL: {{^}}test_default_vi: |
| 13 | ; GCN: FloatMode: 192 |
| 14 | ; GCN: IeeeMode: 0 |
| 15 | define 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 |
| 24 | define 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 |
| 33 | define 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 |
| 42 | define 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 |
| 51 | define 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 | |
| 57 | attributes #0 = { nounwind "target-cpu"="tahiti" } |
| 58 | attributes #1 = { nounwind "target-cpu"="fiji" } |
| 59 | attributes #2 = { nounwind "target-features"="+fp64-denormals" } |
| 60 | attributes #3 = { nounwind "target-features"="+fp32-denormals" } |
| 61 | attributes #4 = { nounwind "target-features"="+fp32-denormals,+fp64-denormals" } |
| 62 | attributes #5 = { nounwind "target-features"="-fp32-denormals,-fp64-denormals" } |