From f57d692c11f0ff6e9c45d2c48c5f362f4c575cf7 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Thu, 12 Sep 2013 23:44:53 +0000 Subject: R600: Move code handling literal folding into R600ISelLowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190644 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/R600/literals.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/CodeGen/R600') diff --git a/test/CodeGen/R600/literals.ll b/test/CodeGen/R600/literals.ll index e5bdbc43c2..47191e0a27 100644 --- a/test/CodeGen/R600/literals.ll +++ b/test/CodeGen/R600/literals.ll @@ -46,3 +46,19 @@ entry: store <4 x i32> , <4 x i32> addrspace(1)* %out ret void } + +; CHECK: @inline_literal_dot4 +; CHECK: DOT4 T[[GPR:[0-9]]].X, 1.0 +; CHECK-NEXT: DOT4 T[[GPR]].Y (MASKED), 1.0 +; CHECK-NEXT: DOT4 T[[GPR]].Z (MASKED), 1.0 +; CHECK-NEXT: DOT4 * T[[GPR]].W (MASKED), 1.0 +define void @inline_literal_dot4(float addrspace(1)* %out) { +entry: + %0 = call float @llvm.AMDGPU.dp4(<4 x float> , <4 x float> ) + store float %0, float addrspace(1)* %out + ret void +} + +declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1 + +attributes #1 = { readnone } -- cgit v1.2.3