1 ; RUN: llc < %s -mcpu=generic -mtriple=x86_64-apple-macosx | FileCheck %s
4 ;; The registers %x and %y must both spill across the finit call.
5 ;; Check that they are spilled early enough that not copies are needed for the
13 ; CHECK-NEXT: cvtss2sd
16 define i32 @pr10221(float %x, float %y, i8** nocapture %_retval) nounwind uwtable ssp {
18 %add = fadd float %x, %y
19 %conv = fpext float %add to double
20 %call = tail call i32 @finit(double %conv) nounwind
21 %tobool = icmp eq i32 %call, 0
22 br i1 %tobool, label %return, label %if.end
24 if.end: ; preds = %entry
25 tail call void @foo(float %x, float %y) nounwind
28 return: ; preds = %entry, %if.end
29 %retval.0 = phi i32 [ 0, %if.end ], [ 5, %entry ]
33 declare i32 @finit(double)
35 declare void @foo(float, float)