diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp --- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp +++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp @@ -1811,8 +1811,7 @@ // We are disabling shrinkwrapping for now when PAC is enabled, as // shrinkwrapping can cause clobbering of r12 when the PAC code is // generated. A follow-up patch will fix this in a more performant manner. - if (MF.getInfo()->shouldSignReturnAddress( - false /*SpillsLR */)) + if (MF.getInfo()->shouldSignReturnAddress()) return false; return true; diff --git a/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-3.ll b/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-3.ll --- a/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-3.ll +++ b/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-3.ll @@ -48,7 +48,6 @@ } ; CHECK-LABEL: f: -; CHECK: bmi .LBB ; ... ; CHECK: pac r12, lr, sp ; CHECK-NEXT: .save {r4, r5, r6, lr} @@ -66,14 +65,13 @@ ; CHECK-NEXT: sub sp, #4 ; CHECK-NEXT: .cfi_def_cfa_offset 24 ; ... +; CHECK: bl OUTLINED_FUNCTION_0 +; ... ; CHECK: add sp, #4 ; CHECK-NEXT: ldr r12, [sp], #4 ; CHECK-NEXT: pop.w {r4, r5, r6, lr} ; CHECK-NEXT: aut r12, lr, sp ; CHECK-NEXT: bx lr -; ... -; CHECK: .LBB -; CHECK: bx lr define hidden i32 @g(i32 %a, i32 %b, i32 %c, i32 %d) local_unnamed_addr #0 { @@ -97,8 +95,6 @@ ret i32 %retval.0 } ; CHECK-LABEL: g: -; CHECK: bmi .LBB -; ... ; CHECK: pac r12, lr, sp ; CHECK-NEXT: .save {r4, r5, r6, lr} ; CHECK-NEXT: push {r4, r5, r6, lr} @@ -115,14 +111,13 @@ ; CHECK-NEXT: sub sp, #4 ; CHECK-NEXT: .cfi_def_cfa_offset 24 ; ... +; CHECK: bl OUTLINED_FUNCTION_0 +; ... ; CHECK: add sp, #4 ; CHECK-NEXT: ldr r12, [sp], #4 ; CHECK-NEXT: pop.w {r4, r5, r6, lr} ; CHECK-NEXT: aut r12, lr, sp ; CHECK-NEXT: bx lr -; ... -; CHECK: .LBB -; CHECK: bx lr ; CHECK-LABEL: OUTLINED_FUNCTION_0: ; CHECK: pac r12, lr, sp