[all-commits] [llvm/llvm-project] 0146d2: [AArch64] Do not fold SP adjustments into pre-incr...
AE via All-commits
all-commits at lists.llvm.org
Wed Feb 24 09:56:26 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0146d206317e1d40775621639a4dde7c43e0f433
https://github.com/llvm/llvm-project/commit/0146d206317e1d40775621639a4dde7c43e0f433
Author: Amara Emerson <amara at apple.com>
Date: 2021-02-24 (Wed, 24 Feb 2021)
Changed paths:
M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.h
M llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
A llvm/test/CodeGen/AArch64/ldst-nopreidx-sp-redzone.mir
Log Message:
-----------
[AArch64] Do not fold SP adjustments into pre-increment addr modes if it overflows the redzone.
Instead of outright disabling this completely with the noredzone attribute,
we only avoid doing the optimization if there are memory operations between
the adjustment and the load/store that the adjustment would be folded into.
This avoids the case of something like a stack cookie being corrupted if an
exception happens before the pre-increment to the SP occurs.
This also prevents the folding happening if we have a redzone, but the offset
being folded is above the redzone amount (128 bytes in this case).
rdar://73269336
Differential Revision: https://reviews.llvm.org/D95179
More information about the All-commits
mailing list