Home | History | Annotate | Download | only in R600
      1 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG --check-prefix=FUNC %s
      2 ; RUN: llc -march=r600 -mcpu=SI < %s | FileCheck -check-prefix=SI --check-prefix=FUNC %s
      3 
      4 declare float @llvm.trunc.f32(float) nounwind readnone
      5 declare <2 x float> @llvm.trunc.v2f32(<2 x float>) nounwind readnone
      6 declare <3 x float> @llvm.trunc.v3f32(<3 x float>) nounwind readnone
      7 declare <4 x float> @llvm.trunc.v4f32(<4 x float>) nounwind readnone
      8 declare <8 x float> @llvm.trunc.v8f32(<8 x float>) nounwind readnone
      9 declare <16 x float> @llvm.trunc.v16f32(<16 x float>) nounwind readnone
     10 
     11 ; FUNC-LABEL: @ftrunc_f32:
     12 ; EG: TRUNC
     13 ; SI: V_TRUNC_F32_e32
     14 define void @ftrunc_f32(float addrspace(1)* %out, float %x) {
     15   %y = call float @llvm.trunc.f32(float %x) nounwind readnone
     16   store float %y, float addrspace(1)* %out
     17   ret void
     18 }
     19 
     20 ; FUNC-LABEL: @ftrunc_v2f32:
     21 ; EG: TRUNC
     22 ; EG: TRUNC
     23 ; SI: V_TRUNC_F32_e32
     24 ; SI: V_TRUNC_F32_e32
     25 define void @ftrunc_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %x) {
     26   %y = call <2 x float> @llvm.trunc.v2f32(<2 x float> %x) nounwind readnone
     27   store <2 x float> %y, <2 x float> addrspace(1)* %out
     28   ret void
     29 }
     30 
     31 ; FIXME-FUNC-LABEL: @ftrunc_v3f32:
     32 ; FIXME-EG: TRUNC
     33 ; FIXME-EG: TRUNC
     34 ; FIXME-EG: TRUNC
     35 ; FIXME-SI: V_TRUNC_F32_e32
     36 ; FIXME-SI: V_TRUNC_F32_e32
     37 ; FIXME-SI: V_TRUNC_F32_e32
     38 ; define void @ftrunc_v3f32(<3 x float> addrspace(1)* %out, <3 x float> %x) {
     39 ;   %y = call <3 x float> @llvm.trunc.v3f32(<3 x float> %x) nounwind readnone
     40 ;   store <3 x float> %y, <3 x float> addrspace(1)* %out
     41 ;   ret void
     42 ; }
     43 
     44 ; FUNC-LABEL: @ftrunc_v4f32:
     45 ; EG: TRUNC
     46 ; EG: TRUNC
     47 ; EG: TRUNC
     48 ; EG: TRUNC
     49 ; SI: V_TRUNC_F32_e32
     50 ; SI: V_TRUNC_F32_e32
     51 ; SI: V_TRUNC_F32_e32
     52 ; SI: V_TRUNC_F32_e32
     53 define void @ftrunc_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %x) {
     54   %y = call <4 x float> @llvm.trunc.v4f32(<4 x float> %x) nounwind readnone
     55   store <4 x float> %y, <4 x float> addrspace(1)* %out
     56   ret void
     57 }
     58 
     59 ; FUNC-LABEL: @ftrunc_v8f32:
     60 ; EG: TRUNC
     61 ; EG: TRUNC
     62 ; EG: TRUNC
     63 ; EG: TRUNC
     64 ; EG: TRUNC
     65 ; EG: TRUNC
     66 ; EG: TRUNC
     67 ; EG: TRUNC
     68 ; SI: V_TRUNC_F32_e32
     69 ; SI: V_TRUNC_F32_e32
     70 ; SI: V_TRUNC_F32_e32
     71 ; SI: V_TRUNC_F32_e32
     72 ; SI: V_TRUNC_F32_e32
     73 ; SI: V_TRUNC_F32_e32
     74 ; SI: V_TRUNC_F32_e32
     75 ; SI: V_TRUNC_F32_e32
     76 define void @ftrunc_v8f32(<8 x float> addrspace(1)* %out, <8 x float> %x) {
     77   %y = call <8 x float> @llvm.trunc.v8f32(<8 x float> %x) nounwind readnone
     78   store <8 x float> %y, <8 x float> addrspace(1)* %out
     79   ret void
     80 }
     81 
     82 ; FUNC-LABEL: @ftrunc_v16f32:
     83 ; EG: TRUNC
     84 ; EG: TRUNC
     85 ; EG: TRUNC
     86 ; EG: TRUNC
     87 ; EG: TRUNC
     88 ; EG: TRUNC
     89 ; EG: TRUNC
     90 ; EG: TRUNC
     91 ; EG: TRUNC
     92 ; EG: TRUNC
     93 ; EG: TRUNC
     94 ; EG: TRUNC
     95 ; EG: TRUNC
     96 ; EG: TRUNC
     97 ; EG: TRUNC
     98 ; EG: TRUNC
     99 ; SI: V_TRUNC_F32_e32
    100 ; SI: V_TRUNC_F32_e32
    101 ; SI: V_TRUNC_F32_e32
    102 ; SI: V_TRUNC_F32_e32
    103 ; SI: V_TRUNC_F32_e32
    104 ; SI: V_TRUNC_F32_e32
    105 ; SI: V_TRUNC_F32_e32
    106 ; SI: V_TRUNC_F32_e32
    107 ; SI: V_TRUNC_F32_e32
    108 ; SI: V_TRUNC_F32_e32
    109 ; SI: V_TRUNC_F32_e32
    110 ; SI: V_TRUNC_F32_e32
    111 ; SI: V_TRUNC_F32_e32
    112 ; SI: V_TRUNC_F32_e32
    113 ; SI: V_TRUNC_F32_e32
    114 ; SI: V_TRUNC_F32_e32
    115 define void @ftrunc_v16f32(<16 x float> addrspace(1)* %out, <16 x float> %x) {
    116   %y = call <16 x float> @llvm.trunc.v16f32(<16 x float> %x) nounwind readnone
    117   store <16 x float> %y, <16 x float> addrspace(1)* %out
    118   ret void
    119 }
    120