1 ; RUN: opt -instcombine -S -disable-simplify-libcalls < %s | FileCheck %s
4 ; Instcombine tries to fold (fptrunc (sqrt (fpext x))) -> (sqrtf x), but this
5 ; shouldn't fold when sqrtf isn't available.
6 define float @foo(float %f) uwtable ssp {
8 ; CHECK: %conv = fpext float %f to double
9 ; CHECK: %call = tail call double @sqrt(double %conv)
10 ; CHECK: %conv1 = fptrunc double %call to float
11 %conv = fpext float %f to double
12 %call = tail call double @sqrt(double %conv)
13 %conv1 = fptrunc double %call to float
17 declare double @sqrt(double)