65 lines · plain
1; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s2; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefix=GCN %s3 4declare float @llvm.fabs.f32(float) #05declare double @llvm.fabs.f64(double) #06declare float @llvm.amdgcn.frexp.mant.f32(float) #07declare double @llvm.amdgcn.frexp.mant.f64(double) #08 9; GCN-LABEL: {{^}}s_test_frexp_mant_f32:10; GCN: v_frexp_mant_f32_e32 {{v[0-9]+}}, {{s[0-9]+}}11define amdgpu_kernel void @s_test_frexp_mant_f32(ptr addrspace(1) %out, float %src) #1 {12 %frexp.mant = call float @llvm.amdgcn.frexp.mant.f32(float %src)13 store float %frexp.mant, ptr addrspace(1) %out14 ret void15}16 17; GCN-LABEL: {{^}}s_test_fabs_frexp_mant_f32:18; GCN: v_frexp_mant_f32_e64 {{v[0-9]+}}, |{{s[0-9]+}}|19define amdgpu_kernel void @s_test_fabs_frexp_mant_f32(ptr addrspace(1) %out, float %src) #1 {20 %fabs.src = call float @llvm.fabs.f32(float %src)21 %frexp.mant = call float @llvm.amdgcn.frexp.mant.f32(float %fabs.src)22 store float %frexp.mant, ptr addrspace(1) %out23 ret void24}25 26; GCN-LABEL: {{^}}s_test_fneg_fabs_frexp_mant_f32:27; GCN: v_frexp_mant_f32_e64 {{v[0-9]+}}, -|{{s[0-9]+}}|28define amdgpu_kernel void @s_test_fneg_fabs_frexp_mant_f32(ptr addrspace(1) %out, float %src) #1 {29 %fabs.src = call float @llvm.fabs.f32(float %src)30 %fneg.fabs.src = fneg float %fabs.src31 %frexp.mant = call float @llvm.amdgcn.frexp.mant.f32(float %fneg.fabs.src)32 store float %frexp.mant, ptr addrspace(1) %out33 ret void34}35 36; GCN-LABEL: {{^}}s_test_frexp_mant_f64:37; GCN: v_frexp_mant_f64_e32 {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}38define amdgpu_kernel void @s_test_frexp_mant_f64(ptr addrspace(1) %out, double %src) #1 {39 %frexp.mant = call double @llvm.amdgcn.frexp.mant.f64(double %src)40 store double %frexp.mant, ptr addrspace(1) %out41 ret void42}43 44; GCN-LABEL: {{^}}s_test_fabs_frexp_mant_f64:45; GCN: v_frexp_mant_f64_e64 {{v\[[0-9]+:[0-9]+\]}}, |{{s\[[0-9]+:[0-9]+\]}}|46define amdgpu_kernel void @s_test_fabs_frexp_mant_f64(ptr addrspace(1) %out, double %src) #1 {47 %fabs.src = call double @llvm.fabs.f64(double %src)48 %frexp.mant = call double @llvm.amdgcn.frexp.mant.f64(double %fabs.src)49 store double %frexp.mant, ptr addrspace(1) %out50 ret void51}52 53; GCN-LABEL: {{^}}s_test_fneg_fabs_frexp_mant_f64:54; GCN: v_frexp_mant_f64_e64 {{v\[[0-9]+:[0-9]+\]}}, -|{{s\[[0-9]+:[0-9]+\]}}|55define amdgpu_kernel void @s_test_fneg_fabs_frexp_mant_f64(ptr addrspace(1) %out, double %src) #1 {56 %fabs.src = call double @llvm.fabs.f64(double %src)57 %fneg.fabs.src = fneg double %fabs.src58 %frexp.mant = call double @llvm.amdgcn.frexp.mant.f64(double %fneg.fabs.src)59 store double %frexp.mant, ptr addrspace(1) %out60 ret void61}62 63attributes #0 = { nounwind readnone }64attributes #1 = { nounwind }65