aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/R600/unaligned-load-store.ll
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-10-30 23:30:05 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-10-30 23:30:05 +0000
commit4f17f88071260cecffd96c272098549ac5887523 (patch)
treeaae21341f4c4b88eef6201b45d4ec193cb8796c2 /test/CodeGen/R600/unaligned-load-store.ll
parent9effcbb879728f8a1e0e86c9cb777f11a9a3be7d (diff)
downloadexternal_llvm-4f17f88071260cecffd96c272098549ac5887523.zip
external_llvm-4f17f88071260cecffd96c272098549ac5887523.tar.gz
external_llvm-4f17f88071260cecffd96c272098549ac5887523.tar.bz2
Fix CodeGen for unaligned loads with address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/R600/unaligned-load-store.ll')
-rw-r--r--test/CodeGen/R600/unaligned-load-store.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/R600/unaligned-load-store.ll b/test/CodeGen/R600/unaligned-load-store.ll
new file mode 100644
index 0000000..d887594
--- /dev/null
+++ b/test/CodeGen/R600/unaligned-load-store.ll
@@ -0,0 +1,19 @@
+; RUN: llc -march=r600 -mcpu=SI < %s | FileCheck -check-prefix=SI %s
+
+; SI-LABEL: @unaligned_load_store_i32:
+; SI: V_ADD_I32_e64 [[REG:VGPR[0-9]+]]
+; DS_READ_U8 {{VGPR[0-9]+}}, 0, [[REG]]
+define void @unaligned_load_store_i32(i32 addrspace(3)* %p, i32 addrspace(3)* %r) nounwind {
+ %v = load i32 addrspace(3)* %p, align 1
+ store i32 %v, i32 addrspace(3)* %r, align 1
+ ret void
+}
+
+; SI-LABEL: @unaligned_load_store_v4i32:
+; SI: V_ADD_I32_e64 [[REG:VGPR[0-9]+]]
+; DS_READ_U8 {{VGPR[0-9]+}}, 0, [[REG]]
+define void @unaligned_load_store_v4i32(<4 x i32> addrspace(3)* %p, <4 x i32> addrspace(3)* %r) nounwind {
+ %v = load <4 x i32> addrspace(3)* %p, align 1
+ store <4 x i32> %v, <4 x i32> addrspace(3)* %r, align 1
+ ret void
+}