36 lines · plain
1; RUN: llc < %s -mcpu=generic -mtriple=x86_64-apple-macosx | FileCheck %s2; PR102213 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 the6;; fadd and fpext.7 8; CHECK: pr102219; CHECK-NOT: movaps10; CHECK: movss11; CHECK-NEXT: movss12; CHECK-NEXT: addss13; CHECK-NEXT: cvtss2sd14; CHECK-NEXT: finit15 16define i32 @pr10221(float %x, float %y, ptr nocapture %_retval) nounwind uwtable ssp {17entry:18 %add = fadd float %x, %y19 %conv = fpext float %add to double20 %call = tail call i32 @finit(double %conv) nounwind21 %tobool = icmp eq i32 %call, 022 br i1 %tobool, label %return, label %if.end23 24if.end: ; preds = %entry25 tail call void @foo(float %x, float %y) nounwind26 br label %return27 28return: ; preds = %entry, %if.end29 %retval.0 = phi i32 [ 0, %if.end ], [ 5, %entry ]30 ret i32 %retval.031}32 33declare i32 @finit(double)34 35declare void @foo(float, float)36