diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-08-19 16:57:05 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-08-19 16:57:05 +0000 |
| commit | 639545b4d8aa3609346fdde711e6918bab129df2 (patch) | |
| tree | 684e065937ec0aad924ba7b3b8a5af72d4e7cd86 /llvm/lib/Target/Hexagon | |
| parent | a871d3872ac55cfab62492e2a1fb7b056d204668 (diff) | |
| download | bcm5719-llvm-639545b4d8aa3609346fdde711e6918bab129df2.tar.gz bcm5719-llvm-639545b4d8aa3609346fdde711e6918bab129df2.zip | |
[Hexagon] Enforce LLSC packetization rules
Ensure that load locked and store conditional instructions are only
packetized with ALU32 instructions.
Patch by Ben Craig.
llvm-svn: 279272
Diffstat (limited to 'llvm/lib/Target/Hexagon')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp b/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp index e0f8b44a801..b2acace100d 100644 --- a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp +++ b/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp @@ -1031,6 +1031,24 @@ static bool cannotCoexistAsymm(const MachineInstr &MI, const MachineInstr &MJ, return MJ.isInlineAsm() || MJ.isBranch() || MJ.isBarrier() || MJ.isCall() || MJ.isTerminator(); + switch (MI.getOpcode()) { + case (Hexagon::S2_storew_locked): + case (Hexagon::S4_stored_locked): + case (Hexagon::L2_loadw_locked): + case (Hexagon::L4_loadd_locked): + case (Hexagon::Y4_l2fetch): { + // These instructions can only be grouped with ALU32 or non-floating-point + // XTYPE instructions. Since there is no convenient way of identifying fp + // XTYPE instructions, only allow grouping with ALU32 for now. + unsigned TJ = HII.getType(MJ); + if (TJ != HexagonII::TypeALU32) + return true; + break; + } + default: + break; + } + // "False" really means that the quick check failed to determine if // I and J cannot coexist. return false; |

