Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc < %s -march=ppc32 -mcpu=440 -fp-contract=fast | FileCheck %s
      2 
      3 %0 = type { double, double }
      4 
      5 define void @maybe_an_fma(%0* sret %agg.result, %0* byval %a, %0* byval %b, %0* byval %c) nounwind {
      6 entry:
      7   %a.realp = getelementptr inbounds %0, %0* %a, i32 0, i32 0
      8   %a.real = load double, double* %a.realp
      9   %a.imagp = getelementptr inbounds %0, %0* %a, i32 0, i32 1
     10   %a.imag = load double, double* %a.imagp
     11   %b.realp = getelementptr inbounds %0, %0* %b, i32 0, i32 0
     12   %b.real = load double, double* %b.realp
     13   %b.imagp = getelementptr inbounds %0, %0* %b, i32 0, i32 1
     14   %b.imag = load double, double* %b.imagp
     15   %mul.rl = fmul double %a.real, %b.real
     16   %mul.rr = fmul double %a.imag, %b.imag
     17   %mul.r = fsub double %mul.rl, %mul.rr
     18   %mul.il = fmul double %a.imag, %b.real
     19   %mul.ir = fmul double %a.real, %b.imag
     20   %mul.i = fadd double %mul.il, %mul.ir
     21   %c.realp = getelementptr inbounds %0, %0* %c, i32 0, i32 0
     22   %c.real = load double, double* %c.realp
     23   %c.imagp = getelementptr inbounds %0, %0* %c, i32 0, i32 1
     24   %c.imag = load double, double* %c.imagp
     25   %add.r = fadd double %mul.r, %c.real
     26   %add.i = fadd double %mul.i, %c.imag
     27   %real = getelementptr inbounds %0, %0* %agg.result, i32 0, i32 0
     28   %imag = getelementptr inbounds %0, %0* %agg.result, i32 0, i32 1
     29   store double %add.r, double* %real
     30   store double %add.i, double* %imag
     31   ret void
     32 ; CHECK: fmadd
     33 }
     34