1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00
llvm-mirror/test/CodeGen/AArch64/regress-w29-reserved-with-fp.ll
Sander de Smalen e877a2fb7c Relanding r368987 [AArch64] Change location of frame-record within callee-save area.
Changes:
There was a condition for `!NeedsFrameRecord` missing in the assert. The
assert in question has changed to:

+    assert((!RPI.isPaired() || !NeedsFrameRecord || RPI.Reg2 != AArch64::FP ||
+            RPI.Reg1 == AArch64::LR) &&
+           "FrameRecord must be allocated together with LR");

This addresses PR43016.

llvm-svn: 369122
2019-08-16 15:42:28 +00:00

38 lines
1.0 KiB
LLVM

; RUN: llc -mtriple=aarch64-none-linux-gnu -frame-pointer=all < %s | FileCheck %s
@var = global i32 0
declare void @bar()
define void @test_w29_reserved() {
; CHECK-LABEL: test_w29_reserved:
; CHECK: mov x29, sp
%val1 = load volatile i32, i32* @var
%val2 = load volatile i32, i32* @var
%val3 = load volatile i32, i32* @var
%val4 = load volatile i32, i32* @var
%val5 = load volatile i32, i32* @var
%val6 = load volatile i32, i32* @var
%val7 = load volatile i32, i32* @var
%val8 = load volatile i32, i32* @var
%val9 = load volatile i32, i32* @var
; CHECK-NOT: ldr w29,
; Call to prevent fp-elim that occurs regardless in leaf functions.
call void @bar()
store volatile i32 %val1, i32* @var
store volatile i32 %val2, i32* @var
store volatile i32 %val3, i32* @var
store volatile i32 %val4, i32* @var
store volatile i32 %val5, i32* @var
store volatile i32 %val6, i32* @var
store volatile i32 %val7, i32* @var
store volatile i32 %val8, i32* @var
store volatile i32 %val9, i32* @var
ret void
; CHECK: ret
}