]> granicus.if.org Git - llvm/commit
[ARM] Correct register for narrowing and widening MVE loads and stores.
authorDavid Green <david.green@arm.com>
Fri, 16 Aug 2019 13:42:39 +0000 (13:42 +0000)
committerDavid Green <david.green@arm.com>
Fri, 16 Aug 2019 13:42:39 +0000 (13:42 +0000)
commita2567a6d9e02633d02bbaed05a12e1b4748885b0
treef6e3e37def9f8fd49b3184e06fbd0c5c848775f7
parent1be51e3c1ee64a21974a20cd093b90422646b91e
[ARM] Correct register for narrowing and widening MVE loads and stores.

The widening and narrowing MVE instructions like VLDRH.32 are only permitted to
use low tGPR registers. This means that if they are used for a stack slot,
where the register used is only decided during frame setup, we need to be able
to correctly pick a thumb1 register over a normal GPR.

This attempts to add the required logic into eliminateFrameIndex and
rewriteT2FrameIndex, only picking the FrameReg if it is a valid register for
the operands register class, and picking a valid scratch register for the
register class.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369108 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/Thumb2InstrInfo.cpp
test/CodeGen/Thumb2/mve-stack.ll [new file with mode: 0644]