2014-05-02 15:41:47 +00:00
|
|
|
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s -check-prefix=EG -check-prefix=FUNC
|
|
|
|
;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s -check-prefix=SI -check-prefix=FUNC
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2014-05-02 15:41:47 +00:00
|
|
|
;FUNC-LABEL: test
|
|
|
|
;EG: MULADD_IEEE *
|
|
|
|
;EG: FRACT *
|
|
|
|
;EG: ADD *
|
|
|
|
;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
|
|
|
|
;EG-NOT: COS
|
2014-11-05 14:50:53 +00:00
|
|
|
;SI: v_cos_f32
|
|
|
|
;SI-NOT: v_cos_f32
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2014-05-02 15:41:47 +00:00
|
|
|
define void @test(float addrspace(1)* %out, float %x) #1 {
|
|
|
|
%cos = call float @llvm.cos.f32(float %x)
|
|
|
|
store float %cos, float addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
;FUNC-LABEL: testv
|
|
|
|
;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
|
|
|
|
;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
|
|
|
|
;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
|
|
|
|
;EG: COS * T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
|
|
|
|
;EG-NOT: COS
|
2014-11-05 14:50:53 +00:00
|
|
|
;SI: v_cos_f32
|
|
|
|
;SI: v_cos_f32
|
|
|
|
;SI: v_cos_f32
|
|
|
|
;SI: v_cos_f32
|
|
|
|
;SI-NOT: v_cos_f32
|
2014-05-02 15:41:47 +00:00
|
|
|
|
|
|
|
define void @testv(<4 x float> addrspace(1)* %out, <4 x float> inreg %vx) #1 {
|
|
|
|
%cos = call <4 x float> @llvm.cos.v4f32(<4 x float> %vx)
|
|
|
|
store <4 x float> %cos, <4 x float> addrspace(1)* %out
|
2012-12-11 21:25:42 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare float @llvm.cos.f32(float) readnone
|
2014-05-02 15:41:47 +00:00
|
|
|
declare <4 x float> @llvm.cos.v4f32(<4 x float>) readnone
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2013-11-11 22:10:24 +00:00
|
|
|
attributes #0 = { "ShaderType"="0" }
|