[PATCH 2/2] R600/SI: add sin-fold test case

Matt Arsenault arsenm2 at gmail.com
Thu Jul 17 14:59:55 PDT 2014


On Jul 17, 2014, at 2:50 PM, Grigori Goronzy <greg at chown.ath.cx> wrote:

> ---
> test/CodeGen/R600/llvm.sin-fold.ll | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
> create mode 100644 test/CodeGen/R600/llvm.sin-fold.ll
> 
> diff --git a/test/CodeGen/R600/llvm.sin-fold.ll b/test/CodeGen/R600/llvm.sin-fold.ll
> new file mode 100644
> index 0000000..72d3e45
> --- /dev/null
> +++ b/test/CodeGen/R600/llvm.sin-fold.ll
> @@ -0,0 +1,19 @@
> +;RUN: llc < %s -march=r600 -enable-unsafe-fp-math -mcpu=SI | FileCheck %s -check-prefix=SI -check-prefix=FUNC

For future reference the < %s should go to the end before the | to make it easier to copy paste the run line when it fails.

This test should just go in the existing sin test file instead of creating a new one. With it moved, LGTM

> +
> +;FUNC-LABEL: test
> +;SI: 4.774
> +;SI: V_MUL_F32
> +;SI: V_FRACT_F32
> +;SI: V_SIN_F32
> +;SI-NOT: V_SIN_F32
> +
> +define void @test(float addrspace(1)* %out, float %x) #1 {
> +   %y = fmul float 3.0, %x
> +   %sin = call float @llvm.sin.f32(float %y)
> +   store float %sin, float addrspace(1)* %out
> +   ret void
> +}
> +
> +declare float @llvm.sin.f32(float) readnone
> +
> +attributes #0 = { "ShaderType"="0" }
> -- 
> 1.8.3.2
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list