Home | History | Annotate | Download | only in R600
      1 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
      2 ; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
      3 
      4 declare float @llvm.AMDGPU.fract.f32(float) nounwind readnone
      5 
      6 ; Legacy name
      7 declare float @llvm.AMDIL.fraction.f32(float) nounwind readnone
      8 
      9 ; FUNC-LABEL: @fract_f32
     10 ; SI: V_FRACT_F32
     11 ; EG: FRACT
     12 define void @fract_f32(float addrspace(1)* %out, float addrspace(1)* %src) nounwind {
     13   %val = load float addrspace(1)* %src, align 4
     14   %fract = call float @llvm.AMDGPU.fract.f32(float %val) nounwind readnone
     15   store float %fract, float addrspace(1)* %out, align 4
     16   ret void
     17 }
     18 
     19 ; FUNC-LABEL: @fract_f32_legacy_amdil
     20 ; SI: V_FRACT_F32
     21 ; EG: FRACT
     22 define void @fract_f32_legacy_amdil(float addrspace(1)* %out, float addrspace(1)* %src) nounwind {
     23   %val = load float addrspace(1)* %src, align 4
     24   %fract = call float @llvm.AMDIL.fraction.f32(float %val) nounwind readnone
     25   store float %fract, float addrspace(1)* %out, align 4
     26   ret void
     27 }
     28