1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=GCN %s 2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=GCN %s 3 4declare float @llvm.amdgcn.fract.f32(float) #0 5declare double @llvm.amdgcn.fract.f64(double) #0 6 7; GCN-LABEL: {{^}}v_fract_f32: 8; GCN: v_fract_f32_e32 {{v[0-9]+}}, {{s[0-9]+}} 9define void @v_fract_f32(float addrspace(1)* %out, float %src) #1 { 10 %fract = call float @llvm.amdgcn.fract.f32(float %src) 11 store float %fract, float addrspace(1)* %out 12 ret void 13} 14 15; GCN-LABEL: {{^}}v_fract_f64: 16; GCN: v_fract_f64_e32 {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}} 17define void @v_fract_f64(double addrspace(1)* %out, double %src) #1 { 18 %fract = call double @llvm.amdgcn.fract.f64(double %src) 19 store double %fract, double addrspace(1)* %out 20 ret void 21} 22 23; GCN-LABEL: {{^}}v_fract_undef_f32: 24; GCN-NOT: v_fract_f32 25; GCN-NOT: v0 26; GCN: buffer_store_dword v0 27define void @v_fract_undef_f32(float addrspace(1)* %out) #1 { 28 %fract = call float @llvm.amdgcn.fract.f32(float undef) 29 store float %fract, float addrspace(1)* %out 30 ret void 31} 32 33attributes #0 = { nounwind readnone } 34attributes #1 = { nounwind } 35