[all-commits] [llvm/llvm-project] 24c84b: [AArch64] Async unwind - Fix MTE codegen emitting ...
Momchil Velikov via All-commits
all-commits at lists.llvm.org
Fri Apr 15 06:03:25 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 24c84bd2363a7195d928ce9beb568b66d8e64869
https://github.com/llvm/llvm-project/commit/24c84bd2363a7195d928ce9beb568b66d8e64869
Author: Momchil Velikov <momchil.velikov at arm.com>
Date: 2022-04-15 (Fri, 15 Apr 2022)
Changed paths:
M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
M llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
M llvm/test/CodeGen/AArch64/settag.ll
Log Message:
-----------
[AArch64] Async unwind - Fix MTE codegen emitting frame adjustments in a loop
When untagging the stack, the compiler may emit a sequence like:
```
.LBB0_1:
st2g sp, [sp], #32
sub x8, x8, #32
cbnz x8, .LBB0_1
stg sp, [sp], #16
```
These stack adjustments cannot be described by CFI instructions.
This patch disables merging of SP update with untagging, i.e. makes the
compiler use an additional scratch register (there should be plenty
available at this point as we are in the epilogue) and generate:
```
mov x9, sp
mov x8, #256
stg x9, [x9], #16
.LBB0_1:
sub x8, x8, #32
st2g x9, [x9], #32
cbnz x8, .LBB0_1
add sp, sp, #272
```
Merging is disabled only when we need to generate asynchronous unwind
tables.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D114548
More information about the All-commits
mailing list