1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
3 ; The purpose of this test is to construct a scenario where an odd number
4 ; of callee-saved GPRs as well as an odd number of callee-saved FPRs are
5 ; used. This caused the frame pointer to be aligned to a multiple of 8
6 ; on non-Darwin platforms, rather than a multiple of 16 as usual.
8 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
9 target triple = "aarch64-unknown-linux-gnu"
11 @a = global i64 0, align 4
14 define i64 @b() uwtable {
16 %call = tail call i64 @d()
17 %0 = alloca i8, i64 ptrtoint (ptr @d to i64), align 16
18 %1 = ptrtoint ptr %0 to i64
19 store i64 %1, ptr @a, align 4
20 %call1 = call i64 @e()
21 %conv = sitofp i64 %call1 to float
22 %2 = load i64, ptr @a, align 4
23 %call2 = call i64 @f(i64 %2)
24 %conv3 = fptosi float %conv to i64
29 ; CHECK: str d8, [sp, #-32]!
30 ; CHECK-NEXT: .cfi_def_cfa_offset 32
31 ; CHECK-NEXT: stp x29, x30, [sp, #8]
32 ; CHECK-NEXT: str x19, [sp, #24]
33 ; CHECK-NEXT: add x29, sp, #8
35 ; CHECK: sub sp, x29, #8
36 ; CHECK-NEXT: .cfi_def_cfa wsp, 32
37 ; CHECK-NEXT: ldp x29, x30, [sp, #8]
38 ; CHECK-NEXT: ldr x19, [sp, #24]
39 ; CHECK-NEXT: ldr d8, [sp], #32
40 ; CHECK-NEXT: .cfi_def_cfa_offset 0
41 ; CHECK-NEXT: .cfi_restore w19
42 ; CHECK-NEXT: .cfi_restore w30
43 ; CHECK-NEXT: .cfi_restore w29
44 ; CHECK-NEXT: .cfi_restore b8