diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-08-07 20:33:47 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-08-07 20:33:47 +0000 |
commit | e7ce247dd77bb6324cb7a0c99c9629c4cf0a6e37 (patch) | |
tree | 76c3ae2f100f3920be86ae7fdbc1fc127c69f4cf /llvm/test/CodeGen | |
parent | 9b073470334adfedfe265728382c7c5e07af319b (diff) | |
download | bcm5719-llvm-e7ce247dd77bb6324cb7a0c99c9629c4cf0a6e37.tar.gz bcm5719-llvm-e7ce247dd77bb6324cb7a0c99c9629c4cf0a6e37.zip |
[Hexagon] Allow use of gather intrinsics even with no-packets
Vgather requires must be in a packet with a store, which contradicts
the no-packets feature. As a consequence, gather/scatter could not be
used with no-packets. Relax this, and allow gather packets as exceptions
to the no-packets requirements.
llvm-svn: 339177
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/Hexagon/no-packets-gather.ll | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/Hexagon/no-packets-gather.ll b/llvm/test/CodeGen/Hexagon/no-packets-gather.ll index 516419b7372..06054b6b2f4 100644 --- a/llvm/test/CodeGen/Hexagon/no-packets-gather.ll +++ b/llvm/test/CodeGen/Hexagon/no-packets-gather.ll @@ -1,11 +1,32 @@ -; RUN: llc -march=hexagon -mattr=+hvxv60,hvx-length64b < %s | FileCheck %s --check-prefix=CHECK-GATHER -; RUN: not llc -march=hexagon -mattr=+hvxv60,hvx-length64b,-packets %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR +; RUN: llc -march=hexagon -mattr=+hvxv60,hvx-length64b,-packets < %s | FileCheck %s target triple = "hexagon" -; CHECK-GATHER-LABEL: fred: -; CHECK-GATHER: vgather -; CHECK-ERROR: LLVM ERROR: Support for gather requires packets, which are disabled +; Check that the only (multi-instruction) packet is the one with vgather. + +; CHECK-LABEL: fred: +; CHECK: { +; CHECK-NEXT: allocframe(r29,#64):raw +; CHECK-NEXT: } +; CHECK-NEXT: { +; CHECK-NEXT: m0 = r2 +; CHECK-NEXT: } +; CHECK-NEXT: { +; CHECK-NEXT: vtmp.w = vgather(r1,m0,v0.w).w +; CHECK-NEXT: vmem(r0+#0) = vtmp.new +; CHECK-NEXT: } +; CHECK-NEXT: { +; CHECK-NEXT: r29 = and(r29,#-64) +; CHECK-NEXT: } +; CHECK-NEXT: { +; CHECK-NEXT: r0 = add(r29,#0) +; CHECK-NEXT: } +; CHECK-NEXT: { +; CHECK-NEXT: call foo +; CHECK-NEXT: } +; CHECK-NEXT: { +; CHECK-NEXT: r31:30 = dealloc_return(r30):raw +; CHECK-NEXT: } define void @fred(i8* %p, i32 %x, i32 %y) local_unnamed_addr #0 { entry: |