[PATCH] D96004: [AArch64] Stack probing for function prologues

Simonas Kazlauskas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 21 06:50:13 PDT 2021


nagisa added a comment.

Can you please pre-commit the tests so that it is easier to see how the codegen changes? E.g. I suspect the CFI directives in prologue are already broken before your changes and so my comments aren't super relevant.



================
Comment at: llvm/test/CodeGen/AArch64/stack-probing-64k.ll:31
+; CHECK-NEXT:    str x29, [sp, #256] // 8-byte Folded Spill
+; CHECK-NEXT:    .cfi_def_cfa_offset 272
+; CHECK-NEXT:    .cfi_offset w29, -16
----------------
This //should// come directly after the `sub` I believe. Otherwise the stack offsets would be incorrect while the `str x29, [sp, #256]` is being executed.

(Not sure if preexisting, though)


================
Comment at: llvm/test/CodeGen/AArch64/stack-probing-64k.ll:32
+; CHECK-NEXT:    .cfi_def_cfa_offset 272
+; CHECK-NEXT:    .cfi_offset w29, -16
+; CHECK-NEXT:    mov x8, sp
----------------
Is this right? We spilled 8 bytes, but specify the offset for the 32-bit view of the register.


================
Comment at: llvm/test/CodeGen/AArch64/stack-probing-64k.ll:71
+; CHECK-NEXT:    str xzr, [sp]
+; CHECK-NEXT:    .cfi_def_cfa_offset 1040
+; CHECK-NEXT:    .cfi_offset w29, -16
----------------
Similarly, this should come immediately after the `sub` instruction, otherwise the CFI won't describe the stack accurately during the `str` above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96004/new/

https://reviews.llvm.org/D96004



More information about the llvm-commits mailing list