Home | History | Annotate | Download | only in R600
      1 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s
      2 ; RUN: llc -march=r600 -mcpu=bonaire -verify-machineinstrs < %s
      3 
      4 ; This should have the exactly the same output as the test for rint,
      5 ; so no need to check anything.
      6 
      7 declare float @llvm.nearbyint.f32(float) #0
      8 declare <2 x float> @llvm.nearbyint.v2f32(<2 x float>) #0
      9 declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>) #0
     10 declare double @llvm.nearbyint.f64(double) #0
     11 declare <2 x double> @llvm.nearbyint.v2f64(<2 x double>) #0
     12 declare <4 x double> @llvm.nearbyint.v4f64(<4 x double>) #0
     13 
     14 
     15 define void @fnearbyint_f32(float addrspace(1)* %out, float %in) #1 {
     16 entry:
     17   %0 = call float @llvm.nearbyint.f32(float %in)
     18   store float %0, float addrspace(1)* %out
     19   ret void
     20 }
     21 
     22 define void @fnearbyint_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %in) #1 {
     23 entry:
     24   %0 = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> %in)
     25   store <2 x float> %0, <2 x float> addrspace(1)* %out
     26   ret void
     27 }
     28 
     29 define void @fnearbyint_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %in) #1 {
     30 entry:
     31   %0 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %in)
     32   store <4 x float> %0, <4 x float> addrspace(1)* %out
     33   ret void
     34 }
     35 
     36 define void @nearbyint_f64(double addrspace(1)* %out, double %in) {
     37 entry:
     38   %0 = call double @llvm.nearbyint.f64(double %in)
     39   store double %0, double addrspace(1)* %out
     40   ret void
     41 }
     42 define void @nearbyint_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %in) {
     43 entry:
     44   %0 = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %in)
     45   store <2 x double> %0, <2 x double> addrspace(1)* %out
     46   ret void
     47 }
     48 
     49 define void @nearbyint_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %in) {
     50 entry:
     51   %0 = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %in)
     52   store <4 x double> %0, <4 x double> addrspace(1)* %out
     53   ret void
     54 }
     55 
     56 attributes #0 = { nounwind readonly }
     57 attributes #1 = { nounwind }
     58