summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-04-06 18:19:22 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-04-06 18:19:22 +0000
commitb7e54e8482b424d819c60fca747a43105dd21e0f (patch)
treefff2ede0c9fcda9b9266ec34ef6b80600c5ca323 /llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
parentfcc97b29c1e4c5f3a049f577661cc73dbfaa3d25 (diff)
downloadbcm5719-llvm-b7e54e8482b424d819c60fca747a43105dd21e0f.tar.gz
bcm5719-llvm-b7e54e8482b424d819c60fca747a43105dd21e0f.zip
[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. llvm-svn: 329439
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp b/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
index f8cfa09baba..8c528b9ed22 100644
--- a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud