[ARM] Add register-mask for tail returns
authorDavid Green <david.green@arm.com>
Sat, 21 May 2022 14:28:24 +0000 (15:28 +0100)
committerDavid Green <david.green@arm.com>
Sat, 21 May 2022 14:28:24 +0000 (15:28 +0100)
commita86cfaea549799c1083b21f664489f131937c148
treebb258d4064dc602bdcdad812aa54c24069d05598
parentc8b675eaa1de1d4edebd0292ca6de3180c687127
[ARM] Add register-mask for tail returns

The TC_RETURN/TCRETURNdi under Arm does not currently add the
register-mask operand when tail folding, which leads to the register
(like LR) not being 'used' by the return. This changes the code to
unconditionally set the register mask on the call, as opposed to
skipping it for tail calls.

I don't believe this will currently alter any codegen, but should glue
things together better post-frame lowering. It matches the AArch64 code
better.

Differential Revision: https://reviews.llvm.org/D125906
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/dbg-tcreturn.ll
llvm/test/DebugInfo/ARM/instr-ref-tcreturn.ll