summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-03-28 15:43:03 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-03-28 15:43:03 +0000
commit2d65ea74dcd26fe6468944900b7d6f762f64e54c (patch)
tree1119f4797d218784f56b87cea58c13b62d0bc9be /llvm/test/CodeGen
parent01f2ca5612127b4ff44e3eb4a63da24627341df8 (diff)
downloadbcm5719-llvm-2d65ea74dcd26fe6468944900b7d6f762f64e54c.tar.gz
bcm5719-llvm-2d65ea74dcd26fe6468944900b7d6f762f64e54c.zip
[Hexagon] Improve handling of unaligned vector loads and stores
llvm-svn: 264584
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Hexagon/select-instr-align.ll31
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/select-instr-align.ll b/llvm/test/CodeGen/Hexagon/select-instr-align.ll
new file mode 100644
index 00000000000..e3b2929d52f
--- /dev/null
+++ b/llvm/test/CodeGen/Hexagon/select-instr-align.ll
@@ -0,0 +1,31 @@
+; RUN: llc -march=hexagon -enable-hexagon-hvx < %s | FileCheck %s
+; CHECK-LABEL: aligned_load:
+; CHECK: = vmem({{.*}})
+; CHECK-LABEL: aligned_store:
+; CHECK: vmem({{.*}}) =
+; CHECK-LABEL: unaligned_load:
+; CHECK: = vmemu({{.*}})
+; CHECK-LABEL: unaligned_store:
+; CHECK: vmemu({{.*}}) =
+
+define <16 x i32> @aligned_load(<16 x i32>* %p, <16 x i32> %a) {
+ %v = load <16 x i32>, <16 x i32>* %p, align 64
+ ret <16 x i32> %v
+}
+
+define void @aligned_store(<16 x i32>* %p, <16 x i32> %a) {
+ store <16 x i32> %a, <16 x i32>* %p, align 64
+ ret void
+}
+
+define <16 x i32> @unaligned_load(<16 x i32>* %p, <16 x i32> %a) {
+ %v = load <16 x i32>, <16 x i32>* %p, align 32
+ ret <16 x i32> %v
+}
+
+define void @unaligned_store(<16 x i32>* %p, <16 x i32> %a) {
+ store <16 x i32> %a, <16 x i32>* %p, align 32
+ ret void
+}
+
+
OpenPOWER on IntegriCloud