[llvm] [AArch64][PAC] Move emission of LR checks in tail calls to AsmPrinter (PR #110705)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 04:06:21 PST 2024
================
@@ -169,13 +169,13 @@ define i32 @test_tailcall_ib_var(ptr %arg0, ptr %arg1) #0 {
define void @test_tailcall_omit_mov_x16_x16(ptr %objptr) #0 {
; CHECK-LABEL: test_tailcall_omit_mov_x16_x16:
-; CHECK: ldr x16, [x0]
-; CHECK: mov x17, x0
-; CHECK: movk x17, #6503, lsl #48
-; CHECK: autda x16, x17
-; CHECK: ldr x2, [x16]
-; CHECK: movk x16, #54167, lsl #48
-; CHECK: braa x2, x16
+; CHECK-NEXT: ldr x16, [x0]
----------------
atrosinenko wrote:
This particular test case was affected by this PR, namely at the commit 0268b5be32f the code was generated as
```
test_tailcall_omit_mov_x16_x16:
ldr x16, [x0]
mov x17, x0
movk x17, #6503, lsl #48
autda x16, x17
ldr x2, [x16]
mov x1, x16
mov x16, x1
movk x16, #54167, lsl #48
braa x2, x16
```
Meaning it became even worse that just `mov x16, x16` and still wasn't caught by the `CHECK:` lines. That was one of the reasons to evaluate whether restricting the call target operand works better.
https://github.com/llvm/llvm-project/pull/110705
More information about the llvm-commits
mailing list