Similar to D67327, but this time for the FP16 VLDR and VSTR instructions that use the AddrMode5FP16 addressing mode. We need to reserve an emergency spill slot for instructions that will be out of range to use sp directly. AddrMode5FP16 is 8 bits with a scale of 2.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I have almost this exact change in a WIP patch, but I didn't get around to posting it because I didn't have a testcase, and I ended up deciding to handle the Thumb1 estimation differently.
llvm/lib/Target/ARM/ARMFrameLowering.cpp | ||
---|---|---|
1566 ↗ | (On Diff #219860) | Can we make this "default" an "llvm_unreachable" so we don't accidentally miss addressing modes in the future, like this? (I think in that case, you'll also need to add explicit cases for debug info, AddrMode_i12, and t2ADDri?) |
Thanks. Good to know I'm not barking up the wrong tree.
This doesn't need the T1 addressing modes added then? Nothing seemed to fail in any of the unittests or the quick tests I ran on it, but they may have been fairly limited.
LGTM
We never call estimateRSStackSizeLimit on Thumb1; we just use a static estimate based on the range of tSTRspi, since in practice almost all functions will contain one.
llvm/lib/Target/ARM/ARMFrameLowering.cpp | ||
---|---|---|
1526 ↗ | (On Diff #220251) | Not that it's important, but it shouldn't really matter if ADDri etc. is out of range: we can use the destination as a scratch register. |