1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/CodeGen/AArch64/local_vars.ll
Tim Northover ca0f4dc4f0 AArch64/ARM64: move ARM64 into AArch64's place
This commit starts with a "git mv ARM64 AArch64" and continues out
from there, renaming the C++ classes, intrinsics, and other
target-local objects for consistency.

"ARM64" test directories are also moved, and tests that began their
life in ARM64 use an arm64 triple, those from AArch64 use an aarch64
triple. Both should be equivalent though.

This finishes the AArch64 merge, and everyone should feel free to
continue committing as normal now.

llvm-svn: 209577
2014-05-24 12:50:23 +00:00

61 lines
1.6 KiB
LLVM

; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -disable-fp-elim | FileCheck -check-prefix CHECK-WITHFP-ARM64 %s
; Make sure a reasonably sane prologue and epilogue are
; generated. This test is not robust in the face of an frame-handling
; evolving, but still has value for unrelated changes, I
; believe.
;
; In particular, it will fail when ldp/stp are used for frame setup,
; when FP-elim is implemented, and when addressing from FP is
; implemented.
@var = global i64 0
@local_addr = global i64* null
declare void @foo()
define void @trivial_func() nounwind {
; CHECK-LABEL: trivial_func: // @trivial_func
; CHECK-NEXT: // BB#0
; CHECK-NEXT: ret
ret void
}
define void @trivial_fp_func() {
; CHECK-WITHFP-AARCH64-LABEL: trivial_fp_func:
; CHECK-WITHFP-AARCH64: sub sp, sp, #16
; CHECK-WITHFP-AARCH64: stp x29, x30, [sp]
; CHECK-WITHFP-AARCH64-NEXT: mov x29, sp
; CHECK-WITHFP-ARM64-LABEL: trivial_fp_func:
; CHECK-WITHFP-ARM64: stp x29, x30, [sp, #-16]!
; CHECK-WITHFP-ARM64-NEXT: mov x29, sp
; Dont't really care, but it would be a Bad Thing if this came after the epilogue.
; CHECK: bl foo
call void @foo()
ret void
; CHECK-WITHFP: ldp x29, x30, [sp]
; CHECK-WITHFP: add sp, sp, #16
; CHECK-WITHFP: ret
}
define void @stack_local() {
%local_var = alloca i64
; CHECK-LABEL: stack_local:
; CHECK: sub sp, sp, #16
%val = load i64* @var
store i64 %val, i64* %local_var
; CHECK-DAG: str {{x[0-9]+}}, [sp, #{{[0-9]+}}]
store i64* %local_var, i64** @local_addr
; CHECK-DAG: add {{x[0-9]+}}, sp, #{{[0-9]+}}
ret void
}