diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-03-30 19:28:37 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-03-30 19:28:37 +0000 |
| commit | 0f983d69a43b71d62c407c51d154698bd41633b6 (patch) | |
| tree | 9bb3c435413dbf8563997479e423c9965acac14c /llvm/lib | |
| parent | 95f9a68b1f8fa4d9a93b8eb5abc5c5c9bc58ee5b (diff) | |
| download | bcm5719-llvm-0f983d69a43b71d62c407c51d154698bd41633b6.tar.gz bcm5719-llvm-0f983d69a43b71d62c407c51d154698bd41633b6.zip | |
[Hexagon] Avoid creating invalid offsets in packetizer
Two memory instructions with a dependency only on the address register
between the two (the first one of them being post-incrememnt) can be
packetized together after the offset on the second was updated to the
incremement value. Make sure that the new offset is valid for the
instruction.
llvm-svn: 328897
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp b/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp index 16d3733b92e..135e90be9d9 100644 --- a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp +++ b/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp @@ -530,6 +530,9 @@ bool HexagonPacketizerList::updateOffset(SUnit *SUI, SUnit *SUJ) { return false; int64_t Offset = MI.getOperand(OPI).getImm(); + if (!HII->isValidOffset(MI.getOpcode(), Offset+Incr, HRI)) + return false; + MI.getOperand(OPI).setImm(Offset + Incr); ChangedOffset = Offset; return true; |

