Home | History | Annotate | Download | only in R600
      1 ;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s -check-prefix=EG -check-prefix=FUNC
      2 ;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s -check-prefix=SI -check-prefix=FUNC
      3 
      4 ;FUNC-LABEL: test
      5 ;EG: MULADD_IEEE *
      6 ;EG: FRACT *
      7 ;EG: ADD *
      8 ;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
      9 ;EG-NOT: COS
     10 ;SI: V_COS_F32
     11 ;SI-NOT: V_COS_F32
     12 
     13 define void @test(float addrspace(1)* %out, float %x) #1 {
     14    %cos = call float @llvm.cos.f32(float %x)
     15    store float %cos, float addrspace(1)* %out
     16    ret void
     17 }
     18 
     19 ;FUNC-LABEL: testv
     20 ;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
     21 ;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
     22 ;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
     23 ;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
     24 ;EG-NOT: COS
     25 ;SI: V_COS_F32
     26 ;SI: V_COS_F32
     27 ;SI: V_COS_F32
     28 ;SI: V_COS_F32
     29 ;SI-NOT: V_COS_F32
     30 
     31 define void @testv(<4 x float> addrspace(1)* %out, <4 x float> inreg %vx) #1 {
     32    %cos = call <4 x float> @llvm.cos.v4f32(<4 x float> %vx)
     33    store <4 x float> %cos, <4 x float> addrspace(1)* %out
     34    ret void
     35 }
     36 
     37 declare float @llvm.cos.f32(float) readnone
     38 declare <4 x float> @llvm.cos.v4f32(<4 x float>) readnone
     39 
     40 attributes #0 = { "ShaderType"="0" }
     41