diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp index 27b0906f229..a2adc43bc48 100644 --- a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp +++ b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp @@ -1140,6 +1140,13 @@ void HCE::recordExtender(MachineInstr &MI, unsigned OpNum) { bool IsLoad = MI.mayLoad(); bool IsStore = MI.mayStore(); + // Fixed stack slots have negative indexes, and they cannot be used + // with TRI::stackSlot2Index and TRI::index2StackSlot. This is somewhat + // unfortunate, but should not be a frequent thing. + for (MachineOperand &Op : MI.operands()) + if (Op.isFI() && Op.getIndex() < 0) + return; + if (IsLoad || IsStore) { unsigned AM = HII->getAddrMode(MI); switch (AM) { |

