34 lines · plain
1; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s2; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global < %s | FileCheck -check-prefix=GCN %s3 4declare float @llvm.amdgcn.fract.f32(float) #05declare double @llvm.amdgcn.fract.f64(double) #06 7; GCN-LABEL: {{^}}v_fract_f32:8; GCN: v_fract_f32_e32 {{v[0-9]+}}, {{s[0-9]+}}9define amdgpu_kernel void @v_fract_f32(ptr addrspace(1) %out, float %src) #1 {10 %fract = call float @llvm.amdgcn.fract.f32(float %src)11 store float %fract, ptr addrspace(1) %out12 ret void13}14 15; GCN-LABEL: {{^}}v_fract_f64:16; GCN: v_fract_f64_e32 {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}17define amdgpu_kernel void @v_fract_f64(ptr addrspace(1) %out, double %src) #1 {18 %fract = call double @llvm.amdgcn.fract.f64(double %src)19 store double %fract, ptr addrspace(1) %out20 ret void21}22 23; GCN-LABEL: {{^}}v_fract_undef_f32:24; GCN-NOT: v_fract_f3225; GCN-NOT: store_dword26define amdgpu_kernel void @v_fract_undef_f32(ptr addrspace(1) %out) #1 {27 %fract = call float @llvm.amdgcn.fract.f32(float poison)28 store float %fract, ptr addrspace(1) %out29 ret void30}31 32attributes #0 = { nounwind readnone }33attributes #1 = { nounwind }34