blob: 1a987d02d0796c090a92d82702b064b458e87d16 [file] [log] [blame]
Jakob Stoklund Olesen52346e92011-12-20 22:15:04 +00001; RUN: llc < %s -mcpu=cortex-a8 | FileCheck %s
2target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
3target triple = "thumbv7-apple-ios"
4
5; CHECK: f
6; This function is forced to spill a double.
7; Verify that the spill slot is properly aligned.
8;
9; The caller-saved r4 is used as a scratch register for stack realignment.
10; CHECK: push {r4, r7, lr}
11; CHECK: bic r4, r4, #7
12; CHECK: mov sp, r4
13define void @f(double* nocapture %p) nounwind ssp {
14entry:
15 %0 = load double* %p, align 4
16 tail call void asm sideeffect "", "~{d8},~{d9},~{d10},~{d11},~{d12},~{d13},~{d14},~{d15}"() nounwind
17 tail call void @g() nounwind
18 store double %0, double* %p, align 4
19 ret void
20}
21
22declare void @g()