1 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64-- -mcpu=a2 -fp-contract=fast | FileCheck %s
3 %0 = type { double, double }
5 define void @maybe_an_fma(ptr sret(%0) %agg.result, ptr byval(%0) %a, ptr byval(%0) %b, ptr byval(%0) %c) nounwind {
7 %a.real = load double, ptr %a
8 %a.imagp = getelementptr inbounds %0, ptr %a, i32 0, i32 1
9 %a.imag = load double, ptr %a.imagp
10 %b.real = load double, ptr %b
11 %b.imagp = getelementptr inbounds %0, ptr %b, i32 0, i32 1
12 %b.imag = load double, ptr %b.imagp
13 %mul.rl = fmul double %a.real, %b.real
14 %mul.rr = fmul double %a.imag, %b.imag
15 %mul.r = fsub double %mul.rl, %mul.rr
16 %mul.il = fmul double %a.imag, %b.real
17 %mul.ir = fmul double %a.real, %b.imag
18 %mul.i = fadd double %mul.il, %mul.ir
19 %c.real = load double, ptr %c
20 %c.imagp = getelementptr inbounds %0, ptr %c, i32 0, i32 1
21 %c.imag = load double, ptr %c.imagp
22 %add.r = fadd double %mul.r, %c.real
23 %add.i = fadd double %mul.i, %c.imag
24 %imag = getelementptr inbounds %0, ptr %agg.result, i32 0, i32 1
25 store double %add.r, ptr %agg.result
26 store double %add.i, ptr %imag