blob: 65053820482ffb55d40a6cf9f3d22fc764348c7e [file] [log] [blame]
Owen Anderson3ccd8182010-07-19 08:14:26 +00001; RUN: opt -S -instcombine %s | FileCheck %s
2
3define float @foo(float %x) nounwind readnone ssp {
4entry:
5; CHECK-NOT: fpext
6; CHECK-NOT: sqrt(
7; CHECK: sqrtf(
8; CHECK-NOT: fptrunc
9 %conv = fpext float %x to double ; <double> [#uses=1]
10 %call = tail call double @sqrt(double %conv) nounwind ; <double> [#uses=1]
11 %conv1 = fptrunc double %call to float ; <float> [#uses=1]
12; CHECK: ret float
13 ret float %conv1
14}
15
16declare double @sqrt(double) readnone