189 lines · plain
1; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s2 3; GCN-LABEL: {{^}}test_default_si:4; GCN: FloatMode: 2405; GCN: IeeeMode: 16define amdgpu_kernel void @test_default_si(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #0 {7 store float 0.0, ptr addrspace(1) %out08 store double 0.0, ptr addrspace(1) %out19 ret void10}11 12; GCN-LABEL: {{^}}test_default_vi:13; GCN: FloatMode: 24014; GCN: IeeeMode: 115define amdgpu_kernel void @test_default_vi(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #1 {16 store float 0.0, ptr addrspace(1) %out017 store double 0.0, ptr addrspace(1) %out118 ret void19}20 21; GCN-LABEL: {{^}}test_f64_denormals:22; GCN: FloatMode: 24023; GCN: IeeeMode: 124define amdgpu_kernel void @test_f64_denormals(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #2 {25 store float 0.0, ptr addrspace(1) %out026 store double 0.0, ptr addrspace(1) %out127 ret void28}29 30; GCN-LABEL: {{^}}test_f32_denormals:31; GCNL: FloatMode: 4832; GCN: IeeeMode: 133define amdgpu_kernel void @test_f32_denormals(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #3 {34 store float 0.0, ptr addrspace(1) %out035 store double 0.0, ptr addrspace(1) %out136 ret void37}38 39; GCN-LABEL: {{^}}test_f32_f64_denormals:40; GCN: FloatMode: 24041; GCN: IeeeMode: 142define amdgpu_kernel void @test_f32_f64_denormals(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #4 {43 store float 0.0, ptr addrspace(1) %out044 store double 0.0, ptr addrspace(1) %out145 ret void46}47 48; GCN-LABEL: {{^}}test_no_denormals49; GCN: FloatMode: 050; GCN: IeeeMode: 151define amdgpu_kernel void @test_no_denormals(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #5 {52 store float 0.0, ptr addrspace(1) %out053 store double 0.0, ptr addrspace(1) %out154 ret void55}56 57; GCN-LABEL: {{^}}test_f16_f64_denormals:58; GCN: FloatMode: 24059; GCN: IeeeMode: 160define amdgpu_kernel void @test_f16_f64_denormals(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #6 {61 store half 0.0, ptr addrspace(1) %out062 store double 0.0, ptr addrspace(1) %out163 ret void64}65 66; GCN-LABEL: {{^}}test_no_f16_f64_denormals:67; GCN: FloatMode: 4868; GCN: IeeeMode: 169define amdgpu_kernel void @test_no_f16_f64_denormals(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #7 {70 store half 0.0, ptr addrspace(1) %out071 store double 0.0, ptr addrspace(1) %out172 ret void73}74 75; GCN-LABEL: {{^}}test_f32_f16_f64_denormals:76; GCN: FloatMode: 24077; GCN: IeeeMode: 178define amdgpu_kernel void @test_f32_f16_f64_denormals(ptr addrspace(1) %out0, ptr addrspace(1) %out1, ptr addrspace(1) %out2) #8 {79 store half 0.0, ptr addrspace(1) %out080 store float 0.0, ptr addrspace(1) %out181 store double 0.0, ptr addrspace(1) %out282 ret void83}84 85; GCN-LABEL: {{^}}test_just_f32_attr_flush86; GCN: FloatMode: 19287; GCN: IeeeMode: 188define amdgpu_kernel void @test_just_f32_attr_flush(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #9 {89 store float 0.0, ptr addrspace(1) %out090 store double 0.0, ptr addrspace(1) %out191 ret void92}93 94; GCN-LABEL: {{^}}test_flush_all_outputs:95; GCN: FloatMode: 8096; GCN: IeeeMode: 197define amdgpu_kernel void @test_flush_all_outputs(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #10 {98 store float 0.0, ptr addrspace(1) %out099 store double 0.0, ptr addrspace(1) %out1100 ret void101}102 103; GCN-LABEL: {{^}}test_flush_all_inputs:104; GCN: FloatMode: 160105; GCN: IeeeMode: 1106define amdgpu_kernel void @test_flush_all_inputs(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #11 {107 store float 0.0, ptr addrspace(1) %out0108 store double 0.0, ptr addrspace(1) %out1109 ret void110}111 112; GCN-LABEL: {{^}}test_flush_f32_inputs:113; GCN: FloatMode: 224114; GCN: IeeeMode: 1115define amdgpu_kernel void @test_flush_f32_inputs(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #12 {116 store float 0.0, ptr addrspace(1) %out0117 store double 0.0, ptr addrspace(1) %out1118 ret void119}120 121; GCN-LABEL: {{^}}test_flush_f32_outputs:122; GCN: FloatMode: 208123; GCN: IeeeMode: 1124define amdgpu_kernel void @test_flush_f32_outputs(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #13 {125 store float 0.0, ptr addrspace(1) %out0126 store double 0.0, ptr addrspace(1) %out1127 ret void128}129 130; GCN-LABEL: {{^}}test_flush_f64_inputs:131; GCN: FloatMode: 176132; GCN: IeeeMode: 1133define amdgpu_kernel void @test_flush_f64_inputs(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #14 {134 store float 0.0, ptr addrspace(1) %out0135 store double 0.0, ptr addrspace(1) %out1136 ret void137}138 139; GCN-LABEL: {{^}}test_flush_f64_outputs:140; GCN: FloatMode: 112141; GCN: IeeeMode: 1142define amdgpu_kernel void @test_flush_f64_outputs(ptr addrspace(1) %out0, ptr addrspace(1) %out1) #15 {143 store float 0.0, ptr addrspace(1) %out0144 store double 0.0, ptr addrspace(1) %out1145 ret void146}147 148; GCN-LABEL: {{^}}kill_gs_const:149; GCN: FloatMode: 240150; GCN: IeeeMode: 0151define amdgpu_gs void @kill_gs_const() {152main_body:153 %cmp0 = icmp ule i32 0, 3154 call void @llvm.amdgcn.kill(i1 %cmp0)155 %cmp1 = icmp ule i32 3, 0156 call void @llvm.amdgcn.kill(i1 %cmp1)157 ret void158}159 160; GCN-LABEL: {{^}}kill_vcc_implicit_def:161; GCN: FloatMode: 240162; GCN: IeeeMode: 0163define amdgpu_ps float @kill_vcc_implicit_def(ptr addrspace(4) inreg, ptr addrspace(4) inreg, ptr addrspace(4) inreg, ptr 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) {164entry:165 %tmp0 = fcmp olt float %13, 0.0166 call void @llvm.amdgcn.kill(i1 %tmp0)167 %tmp1 = select i1 %tmp0, float 1.0, float 0.0168 ret float %tmp1169}170 171declare void @llvm.amdgcn.kill(i1)172 173attributes #0 = { nounwind "target-cpu"="tahiti" }174attributes #1 = { nounwind "target-cpu"="fiji" }175attributes #2 = { nounwind "denormal-fp-math"="ieee,ieee" }176attributes #3 = { nounwind "denormal-fp-math-f32"="ieee,ieee" }177attributes #4 = { nounwind "denormal-fp-math"="ieee,ieee" }178attributes #5 = { nounwind "denormal-fp-math"="preserve-sign,preserve-sign" }179attributes #6 = { nounwind "denormal-fp-math"="ieee,ieee" }180attributes #7 = { nounwind "denormal-fp-math-f32"="ieee,ieee" "denormal-fp-math"="preserve-sign,preserve-sign" }181attributes #8 = { nounwind "denormal-fp-math"="ieee,ieee" }182attributes #9 = { nounwind "denormal-fp-math-f32"="preserve-sign,preserve-sign" }183attributes #10 = { nounwind "denormal-fp-math"="preserve-sign,ieee" }184attributes #11 = { nounwind "denormal-fp-math"="ieee,preserve-sign" }185attributes #12 = { nounwind "denormal-fp-math-f32"="ieee,preserve-sign" "denormal-fp-math"="ieee,ieee" }186attributes #13 = { nounwind "denormal-fp-math-f32"="preserve-sign,ieee" "denormal-fp-math"="ieee,ieee" }187attributes #14 = { nounwind "denormal-fp-math"="ieee,preserve-sign" "denormal-fp-math-f32"="ieee,ieee" }188attributes #15 = { nounwind "denormal-fp-math"="preserve-sign,ieee" "denormal-fp-math-f32"="ieee,ieee" }189