brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · d5689c2 Raw
33 lines · plain
1; RUN: opt < %s -passes=instcombine -S | FileCheck %s2; Formerly crashed, PR8490.3 4define fastcc double @gimp_operation_color_balance_map(float %value, double %highlights) nounwind readnone inlinehint {5entry:6; CHECK: gimp_operation_color_balance_map7; CHECK: fneg double8  %conv = fpext float %value to double9  %div = fdiv double %conv, 1.600000e+0110  %add = fadd double %div, 1.000000e+0011  %div1 = fdiv double 1.000000e+00, %add12  %sub = fsub double 1.075000e+00, %div113  %sub24 = fsub double 1.000000e+00, %sub14  %add26 = fadd double %sub, 1.000000e+0015  %cmp86 = fcmp ogt double %highlights, 0.000000e+0016  %cond90 = select i1 %cmp86, double %sub24, double %add2617  %mul91 = fmul double %highlights, %cond9018  %add94 = fadd double %mul91, %mul9119  ret double %add9420}21 22; PR10180: same crash, but with vectors23define <4 x float> @foo(i1 %b, <4 x float> %x, <4 x float> %y, <4 x float> %z) {24; CHECK-LABEL: @foo(25; CHECK: fneg <4 x float>26; CHECK: select27; CHECK: fadd <4 x float>28  %a = fadd <4 x float> %x, %y29  %sub = fsub <4 x float> %x, %z30  %sel = select i1 %b, <4 x float> %a, <4 x float> %sub 31  ret <4 x float> %sel32}33