Home | History | Annotate | Download | only in R600
      1 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck %s -check-prefix=R600 -check-prefix=FUNC
      2 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
      3 
      4 ; FUNC-LABEL: @rint_f32
      5 ; R600: RNDNE
      6 
      7 ; SI: V_RNDNE_F32_e32
      8 define void @rint_f32(float addrspace(1)* %out, float %in) {
      9 entry:
     10   %0 = call float @llvm.rint.f32(float %in) #0
     11   store float %0, float addrspace(1)* %out
     12   ret void
     13 }
     14 
     15 ; FUNC-LABEL: @rint_v2f32
     16 ; R600: RNDNE
     17 ; R600: RNDNE
     18 
     19 ; SI: V_RNDNE_F32_e32
     20 ; SI: V_RNDNE_F32_e32
     21 define void @rint_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %in) {
     22 entry:
     23   %0 = call <2 x float> @llvm.rint.v2f32(<2 x float> %in) #0
     24   store <2 x float> %0, <2 x float> addrspace(1)* %out
     25   ret void
     26 }
     27 
     28 ; FUNC-LABEL: @rint_v4f32
     29 ; R600: RNDNE
     30 ; R600: RNDNE
     31 ; R600: RNDNE
     32 ; R600: RNDNE
     33 
     34 ; SI: V_RNDNE_F32_e32
     35 ; SI: V_RNDNE_F32_e32
     36 ; SI: V_RNDNE_F32_e32
     37 ; SI: V_RNDNE_F32_e32
     38 define void @rint_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %in) {
     39 entry:
     40   %0 = call <4 x float> @llvm.rint.v4f32(<4 x float> %in) #0
     41   store <4 x float> %0, <4 x float> addrspace(1)* %out
     42   ret void
     43 }
     44 
     45 ; FUNC-LABEL: @legacy_amdil_round_nearest_f32
     46 ; R600: RNDNE
     47 
     48 ; SI: V_RNDNE_F32_e32
     49 define void @legacy_amdil_round_nearest_f32(float addrspace(1)* %out, float %in) {
     50 entry:
     51   %0 = call float @llvm.AMDIL.round.nearest.f32(float %in) #0
     52   store float %0, float addrspace(1)* %out
     53   ret void
     54 }
     55 
     56 declare float @llvm.AMDIL.round.nearest.f32(float) #0
     57 declare float @llvm.rint.f32(float) #0
     58 declare <2 x float> @llvm.rint.v2f32(<2 x float>) #0
     59 declare <4 x float> @llvm.rint.v4f32(<4 x float>) #0
     60 
     61 attributes #0 = { nounwind readnone }
     62