[ARM] Fix for MVE load/store stack accesses
authorDavid Green <david.green@arm.com>
Tue, 17 Sep 2019 12:58:51 +0000 (12:58 +0000)
committerDavid Green <david.green@arm.com>
Tue, 17 Sep 2019 12:58:51 +0000 (12:58 +0000)
commit1ff955305768b772be19ce8ee76246ab249bbe1c
tree28e5437a961851c29ccf9a7b8dce86d9c7d63fa0
parentdf4b9a3f4f7acf76968540391223ec23844e6aa7
[ARM] Fix for MVE load/store stack accesses

MVE loads and stores have a 7 bit immediate range, scaled by the length of the type. This needs to be taught to the stack estimation code to ensure that an emergency spill slot is reserved in case we run out of registers when materialising stack indices.

Also the narrowing loads/stores can be created with frame indices even though they do not accept SP as a register. We need in those cases to make sure we have an emergency register to use as the frame base, as SP can never be used.

Differential Revision: https://reviews.llvm.org/D67327

llvm-svn: 372114
llvm/lib/Target/ARM/ARMFrameLowering.cpp
llvm/test/CodeGen/Thumb2/mve-stacksplot.mir [new file with mode: 0644]