[llvm] [ARM] Switch to LiveRegUnits to fix r7 register allocation bug (PR #84474)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 18:34:45 PDT 2024


================
@@ -18,11 +18,10 @@ define <4 x i32> @f() local_unnamed_addr #0 {
 ; CHECK-V4T-NEXT:    movs r2, #3
 ; CHECK-V4T-NEXT:    movs r3, #4
 ; CHECK-V4T-NEXT:    bl g
+; CHECK-V4T-NEXT:    ldr r7, [sp, #4]
----------------
efriedma-quic wrote:

This doesn't look right: if we have a frame pointer in r7, we can't use r7 to store the return address.  (This matters for anything trying to asynchronously unwind using the frame pointer chain, like profilers.)

https://github.com/llvm/llvm-project/pull/84474


More information about the llvm-commits mailing list