Files
clang-p2996/llvm/test/CodeGen/AArch64/GlobalISel/select-frameaddr.ll
Matt Arsenault 46584de02c AArch64/GlobalISel: Convert tests to opaque pointers
inttoptr_add.ll had a mangled bitcast constantexpr.
translate-gep.ll: Restored a 0 GEP
2022-12-02 16:19:38 -05:00

21 lines
474 B
LLVM

; RUN: llc -mtriple=arm64-apple-ios -global-isel -o - %s | FileCheck %s
define ptr @rt0(i32 %x) nounwind readnone {
entry:
; CHECK-LABEL: rt0:
; CHECK: mov x0, x29
%0 = tail call ptr @llvm.frameaddress(i32 0)
ret ptr %0
}
define ptr @rt2() nounwind readnone {
entry:
; CHECK-LABEL: rt2:
; CHECK: ldr x[[reg:[0-9]+]], [x29]
; CHECK: ldr x0, [x[[reg]]]
%0 = tail call ptr @llvm.frameaddress(i32 2)
ret ptr %0
}
declare ptr @llvm.frameaddress(i32) nounwind readnone