[llvm] r319470 - [Hexagon] Solo instructions cannot be used with new value jumps

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 12:32:55 PST 2017


Author: kparzysz
Date: Thu Nov 30 12:32:54 2017
New Revision: 319470

URL: http://llvm.org/viewvc/llvm-project?rev=319470&view=rev
Log:
[Hexagon] Solo instructions cannot be used with new value jumps

Added:
    llvm/trunk/test/CodeGen/Hexagon/newvaluejump-solo.mir
Modified:
    llvm/trunk/lib/Target/Hexagon/HexagonNewValueJump.cpp

Modified: llvm/trunk/lib/Target/Hexagon/HexagonNewValueJump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonNewValueJump.cpp?rev=319470&r1=319469&r2=319470&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonNewValueJump.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonNewValueJump.cpp Thu Nov 30 12:32:54 2017
@@ -139,6 +139,9 @@ static bool canBeFeederToNewValueJump(co
   if (II->isImplicitDef())
     return false;
 
+  if (QII->isSolo(*II))
+    return false;
+
   // Make sure there there is no 'def' or 'use' of any of the uses of
   // feeder insn between it's definition, this MI and jump, jmpInst
   // skipping compare, cmpInst.

Added: llvm/trunk/test/CodeGen/Hexagon/newvaluejump-solo.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Hexagon/newvaluejump-solo.mir?rev=319470&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Hexagon/newvaluejump-solo.mir (added)
+++ llvm/trunk/test/CodeGen/Hexagon/newvaluejump-solo.mir Thu Nov 30 12:32:54 2017
@@ -0,0 +1,19 @@
+# RUN: llc -march=hexagon -run-pass hexagon-packetizer %s -o - | FileCheck %s
+
+# Check that there is no new-value jump:
+# CHECK-LABEL: name: fred
+# CHECK-NOT: if{{.*}}cmp
+---
+name: fred
+tracksRegLiveness: true
+
+body: |
+  bb.0:
+    successors: %bb.1
+      %r0 = A2_tfrsi 0
+      %r0 = V6_extractw killed undef %v0, %r0
+      %p0 = C2_cmpeqi killed %r0, 1
+      J2_jumpf killed %p0, %bb.1, implicit-def %pc
+
+  bb.1:
+...




More information about the llvm-commits mailing list