aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/R600/load.vec.ll
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-06-15 00:09:31 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-06-15 00:09:31 +0000
commit5aee09da12a1ba8553792d9017785e51199e38c2 (patch)
treecfd3777c0a4d6cf91e9ab7d8ed10802c736c793c /test/CodeGen/R600/load.vec.ll
parent0add382d14af599ad82133ee5f57500df52e2c2c (diff)
downloadexternal_llvm-5aee09da12a1ba8553792d9017785e51199e38c2.zip
external_llvm-5aee09da12a1ba8553792d9017785e51199e38c2.tar.gz
external_llvm-5aee09da12a1ba8553792d9017785e51199e38c2.tar.bz2
R600: Add SI load support for v[24]i32 and store for v2i32
Also add a seperate vector lit test file, since r600 doesn't seem to handle v2i32 load/store yet, but we can test both for SI. Patch by: Aaron Watry Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry <awatry@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/R600/load.vec.ll')
-rw-r--r--test/CodeGen/R600/load.vec.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/R600/load.vec.ll b/test/CodeGen/R600/load.vec.ll
new file mode 100644
index 0000000..08e034e
--- /dev/null
+++ b/test/CodeGen/R600/load.vec.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck --check-prefix=SI-CHECK %s
+
+; load a v2i32 value from the global address space.
+; SI-CHECK: @load_v2i32
+; SI-CHECK: BUFFER_LOAD_DWORDX2 VGPR{{[0-9]+}}
+define void @load_v2i32(<2 x i32> addrspace(1)* %out, <2 x i32> addrspace(1)* %in) {
+ %a = load <2 x i32> addrspace(1) * %in
+ store <2 x i32> %a, <2 x i32> addrspace(1)* %out
+ ret void
+}
+
+; load a v4i32 value from the global address space.
+; SI-CHECK: @load_v4i32
+; SI-CHECK: BUFFER_LOAD_DWORDX4 VGPR{{[0-9]+}}
+define void @load_v4i32(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* %in) {
+ %a = load <4 x i32> addrspace(1) * %in
+ store <4 x i32> %a, <4 x i32> addrspace(1)* %out
+ ret void
+}