Jakob Stoklund Olesen | 52346e9 | 2011-12-20 22:15:04 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mcpu=cortex-a8 | FileCheck %s |
| 2 | target 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" |
| 3 | target 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 |
| 13 | define void @f(double* nocapture %p) nounwind ssp { |
| 14 | entry: |
| 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 | |
| 22 | declare void @g() |