diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-04-06 18:19:22 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-04-06 18:19:22 +0000 |
commit | 79debc50372ce12eae471bdea0013a2df299c598 (patch) | |
tree | 9452eb81766ef87cff40c081d9d04d65c6e949f9 /lib/Target/Hexagon/HexagonVLIWPacketizer.cpp | |
parent | 5a211dfa54831a00b6665d794e9dd05a082e71c4 (diff) |
[Hexagon] Fix assert with packetizing IMPLICIT_DEF instructions
The compiler is generating packet with the following instructions,
which causes an undefined register assert in the verifier.
$r0 = IMPLICIT_DEF
$r1 = IMPLICIT_DEF
S2_storerd_io killed $r29, 0, killed %d0
The problem is that the packetizer is not saving the IMPLICIT_DEF
instructions, which are needed when checking if it is legal to
add the store instruction. The fix is to add the IMPLICIT_DEF
instructions to the CurrentPacketMIs structure.
Patch by Brendon Cahoon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/HexagonVLIWPacketizer.cpp')
-rw-r--r-- | lib/Target/Hexagon/HexagonVLIWPacketizer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp b/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp index f8cfa09baba..8c528b9ed22 100644 --- a/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp +++ b/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp @@ -1687,8 +1687,12 @@ HexagonPacketizerList::addToPacket(MachineInstr &MI) { PacketStalls = false; PacketStalls |= producesStall(MI); - if (MI.isImplicitDef()) + if (MI.isImplicitDef()) { + // Add to the packet to allow subsequent instructions to be checked + // properly. + CurrentPacketMIs.push_back(&MI); return MII; + } assert(ResourceTracker->canReserveResources(MI)); bool ExtMI = HII->isExtended(MI) || HII->isConstExtended(MI); |