Home | History | Annotate | Download | only in Reassociate
      1 ; RUN: opt -reassociate %s -S | FileCheck %s
      2 
      3 define float @foo(float %a,float %b, float %c) {
      4 ; CHECK: %mul3 = fmul float %a, %b
      5 ; CHECK-NEXT: fmul fast float %c, 2.000000e+00
      6 ; CHECK-NEXT: fadd fast float %factor, %b
      7 ; CHECK-NEXT: fmul fast float %tmp1, %a
      8 ; CHECK-NEXT: fadd fast float %tmp2, %mul3
      9 ; CHECK-NEXT: ret float
     10   %mul1 = fmul fast float %a, %c
     11   %mul2 = fmul fast float %a, %b
     12   %mul3 = fmul float %a, %b
     13   %mul4 = fmul fast float %a, %c
     14   %add1 = fadd fast  float %mul1, %mul3
     15   %add2 = fadd  fast float %mul4, %mul2
     16   %add3 = fadd fast float %add1, %add2
     17   ret float %add3
     18 }
     19