[ARM] Fix PR35481

This patch allows `r7` to be used, regardless of its use as a frame pointer, as
a temporary register when popping `lr`, and also falls back to using a high
temporary register if, for some reason, we weren't able to find a suitable low
one.

Differential revision: https://reviews.llvm.org/D40961
Fixes https://bugs.llvm.org/show_bug.cgi?id=35481



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321989 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed