1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen
Diogo Sampaio f65b040dae [AArch64][Fix] LdSt optimization generate premature stack-popping
Summary:
When moving add and sub to memory operand instructions,
aarch64-ldst-opt would prematurally pop the stack pointer,
before memory instructions that do access the stack using
indirect loads.
e.g.
```
int foo(int offset){
    int local[4] = {0};
    return local[offset];
}
```
would generate:
```
sub     sp, sp, #16            ; Push the stack
mov     x8, sp                 ; Save stack in register
stp     xzr, xzr, [sp], #16    ; Zero initialize stack, and post-increment, making it invalid
------ If an exception goes here, the stack value might be corrupted
ldr     w0, [x8, w0, sxtw #2]  ; Access correct position, but it is not guarded by SP
```

Reviewers: fhahn, foad, thegameg, eli.friedman, efriedma

Reviewed By: efriedma

Subscribers: efriedma, kristof.beyls, hiraditya, danielkiss, llvm-commits, simon_tatham

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75755
2020-03-14 02:03:10 +00:00
..
AArch64 [AArch64][Fix] LdSt optimization generate premature stack-popping 2020-03-14 02:03:10 +00:00
AMDGPU [AMDGPU] Fix endcf collapse 2020-03-13 13:50:21 -07:00
ARC
ARM [ARM] Long shift tests. NFC 2020-03-12 19:01:49 +00:00
AVR
BPF
Generic
Hexagon [Hexagon] Fix match pattern in a testcase 2020-03-09 09:09:58 -05:00
Inputs
Lanai
Mips
MIR Revert "Reland "[DebugInfo] Enable the debug entry values feature by default"" 2020-03-13 15:37:44 -04:00
MSP430
NVPTX ARM: Fixup some tests using denormal-fp-math attribute 2020-03-10 14:02:06 -04:00
PowerPC [PowerPC][AIX] Implement formal arguments passed in stack memory. 2020-03-12 11:48:00 -04:00
RISCV
SPARC
SystemZ [SystemZ] Improve foldMemoryOperandImpl(). 2020-03-10 15:54:47 +01:00
Thumb
Thumb2 [ARM] Optimise ASRL/LSRL to smaller shifts using demand bits. 2020-03-13 10:09:03 +00:00
VE [VE] Target-specific bit size for sjljehprepare 2020-03-10 17:51:16 +01:00
WebAssembly [WebAssembly] Fix SIMD shift unrolling to avoid assertion failure 2020-03-12 12:20:14 -07:00
WinCFGuard
WinEH
X86 [X86] Remove isel patterns for X86VBroadcast+trunc+extload. Replace with DAG combines. 2020-03-13 18:12:16 -07:00
XCore