1 ; RUN: opt < %s -instcombine -S | FileCheck %s
2 ; Formerly crashed, PR8490.
4 define fastcc double @gimp_operation_color_balance_map(float %value, double %highlights) nounwind readnone inlinehint {
6 ; CHECK: gimp_operation_color_balance_map
7 ; CHECK: fsub double -0.000000
8 %conv = fpext float %value to double
9 %div = fdiv double %conv, 1.600000e+01
10 %add = fadd double %div, 1.000000e+00
11 %div1 = fdiv double 1.000000e+00, %add
12 %sub = fsub double 1.075000e+00, %div1
13 %sub24 = fsub double 1.000000e+00, %sub
14 %add26 = fadd double %sub, 1.000000e+00
15 %cmp86 = fcmp ogt double %highlights, 0.000000e+00
16 %cond90 = select i1 %cmp86, double %sub24, double %add26
17 %mul91 = fmul double %highlights, %cond90
18 %add94 = fadd double undef, %mul91