summaryrefslogtreecommitdiff
path: root/test/CodeGen/R600
diff options
context:
space:
mode:
authorVincent Lejeune <vljn@ovi.com>2013-09-12 23:44:53 +0000
committerVincent Lejeune <vljn@ovi.com>2013-09-12 23:44:53 +0000
commitf57d692c11f0ff6e9c45d2c48c5f362f4c575cf7 (patch)
tree75e41c7f2613fc03e76dd49d620eb711066cf2e7 /test/CodeGen/R600
parentfe7831861432d71de47ce502e799fb7264b9f24c (diff)
downloadllvm-f57d692c11f0ff6e9c45d2c48c5f362f4c575cf7.tar.gz
llvm-f57d692c11f0ff6e9c45d2c48c5f362f4c575cf7.tar.bz2
llvm-f57d692c11f0ff6e9c45d2c48c5f362f4c575cf7.tar.xz
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
Diffstat (limited to 'test/CodeGen/R600')
-rw-r--r--test/CodeGen/R600/literals.ll16
1 files changed, 16 insertions, 0 deletions
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> <i32 0, i32 0, i32 0, i32 0>, <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> <float 1.0, float 1.0, float 1.0, float 1.0>, <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0>)
+ store float %0, float addrspace(1)* %out
+ ret void
+}
+
+declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1
+
+attributes #1 = { readnone }