summaryrefslogtreecommitdiff
path: root/test/CodeGen/Hexagon
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-10-11 21:20:43 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-10-11 21:20:43 +0000
commitbdeacd17d754e86a0168b89e43a5f8eb03ef8514 (patch)
treec87ef8eab8b152d6e31c9a51f4a18b7acedde1f9 /test/CodeGen/Hexagon
parent9c28c0a064bf015b761d5fbbae2c0c8e3ef6f4be (diff)
[Hexagon] Make sure that new-value jump is packetized with producer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Hexagon')
-rw-r--r--test/CodeGen/Hexagon/packetize-nvj-no-prune.mir31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/packetize-nvj-no-prune.mir b/test/CodeGen/Hexagon/packetize-nvj-no-prune.mir
new file mode 100644
index 00000000000..7047968ab6f
--- /dev/null
+++ b/test/CodeGen/Hexagon/packetize-nvj-no-prune.mir
@@ -0,0 +1,31 @@
+# RUN: llc -march=hexagon -run-pass hexagon-packetizer %s -o - | FileCheck %s
+
+# Make sure that the new-value jump is packetized with the producer. In this
+# case, the loads cold be packetized together (with updating the offset in
+# the second load), but then the new-value jump would not be possible to
+# put in the same packet.
+
+# CHECK-LABEL: name: fred
+# CHECK: BUNDLE
+# CHECK-NEXT: %r3 = L2_loadri_io %r1, 0
+# CHECK-NEXT: J4_cmpgtu_f_jumpnv_t internal killed %r3
+
+
+--- |
+ define void @fred() { ret void }
+ @array = external global [256 x i32], align 8
+...
+
+---
+name: fred
+tracksRegLiveness: true
+body: |
+ bb.0:
+ successors: %bb.1
+ %r1 = A2_tfrsi @array
+ %r2, %r1 = L2_loadri_pi %r1, 4
+ %r3 = L2_loadri_io %r1, 0
+ J4_cmpgtu_f_jumpnv_t killed %r3, killed %r2, %bb.1, implicit-def %pc
+
+ bb.1:
+...