55 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mcpu=yonah | FileCheck %s3 4target 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"5target triple = "i686-apple-darwin8"6 7; This should store directly into P from the FP stack. It should not8; go through a stack slot to get there.9 10define void @bar(ptr %P) {11; CHECK-LABEL: bar:12; CHECK: ## %bb.0: ## %entry13; CHECK-NEXT: pushl %esi14; CHECK-NEXT: .cfi_def_cfa_offset 815; CHECK-NEXT: subl $8, %esp16; CHECK-NEXT: .cfi_def_cfa_offset 1617; CHECK-NEXT: .cfi_offset %esi, -818; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi19; CHECK-NEXT: calll _foo20; CHECK-NEXT: fstpl (%esi)21; CHECK-NEXT: addl $8, %esp22; CHECK-NEXT: popl %esi23; CHECK-NEXT: retl24entry:25 %tmp = tail call double (...) @foo( ) ; <double> [#uses=1]26 store double %tmp, ptr %P, align 827 ret void28}29 30declare double @foo(...)31 32define void @bar2(ptr %P) {33; CHECK-LABEL: bar2:34; CHECK: ## %bb.0: ## %entry35; CHECK-NEXT: pushl %esi36; CHECK-NEXT: .cfi_def_cfa_offset 837; CHECK-NEXT: subl $8, %esp38; CHECK-NEXT: .cfi_def_cfa_offset 1639; CHECK-NEXT: .cfi_offset %esi, -840; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi41; CHECK-NEXT: calll _foo242; CHECK-NEXT: fstps (%esi)43; CHECK-NEXT: addl $8, %esp44; CHECK-NEXT: popl %esi45; CHECK-NEXT: retl46entry: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 450 ret void51}52 53declare double @foo2(...)54 55