rename test.
[oota-llvm.git] / test / Transforms / InstCombine / sqrt.ll
1 ; RUN: opt -S -instcombine %s | FileCheck %s
2
3 define float @foo(float %x) nounwind readnone ssp {
4 entry:
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
16 declare double @sqrt(double) readnone