1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mcpu=yonah | FileCheck %s
4 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
5 target triple = "i686-apple-darwin8"
7 ; This should store directly into P from the FP stack. It should not
8 ; go through a stack slot to get there.
10 define void @bar(ptr %P) {
12 ; CHECK: ## %bb.0: ## %entry
13 ; CHECK-NEXT: pushl %esi
14 ; CHECK-NEXT: .cfi_def_cfa_offset 8
15 ; CHECK-NEXT: subl $8, %esp
16 ; CHECK-NEXT: .cfi_def_cfa_offset 16
17 ; CHECK-NEXT: .cfi_offset %esi, -8
18 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi
19 ; CHECK-NEXT: calll _foo
20 ; CHECK-NEXT: fstpl (%esi)
21 ; CHECK-NEXT: addl $8, %esp
22 ; CHECK-NEXT: popl %esi
25 %tmp = tail call double (...) @foo( ) ; <double> [#uses=1]
26 store double %tmp, ptr %P, align 8
30 declare double @foo(...)
32 define void @bar2(ptr %P) {
34 ; CHECK: ## %bb.0: ## %entry
35 ; CHECK-NEXT: pushl %esi
36 ; CHECK-NEXT: .cfi_def_cfa_offset 8
37 ; CHECK-NEXT: subl $8, %esp
38 ; CHECK-NEXT: .cfi_def_cfa_offset 16
39 ; CHECK-NEXT: .cfi_offset %esi, -8
40 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi
41 ; CHECK-NEXT: calll _foo2
42 ; CHECK-NEXT: fstps (%esi)
43 ; CHECK-NEXT: addl $8, %esp
44 ; CHECK-NEXT: popl %esi
47 %tmp = tail call double (...) @foo2( ) ; <double> [#uses=1]
48 %tmp1 = fptrunc double %tmp to float ; <float> [#uses=1]
49 store float %tmp1, ptr %P, align 4
53 declare double @foo2(...)