One instruction for multiply-then-add
PowerPC can multiply and add in one shot, rounding only once. It's called a fused multiply-add. Since fp_contract is on here, MWCC happily collapses a multiply that feeds an add into a single fmadds.
Say three f32 arguments p, q, r arrive in f1, f2, f3:
fmadds f1, f1, f2, f3 # one rounding, single precision
blr
Operand order is the part that bites you. fmadds fD, fA, fC, fB means fD = (fA * fC) + fB, so fmadds f1, f1, f2, f3 multiplies f1 by f2 and adds f3. The middle two get multiplied; the last is the addend.
Learn to spot this one. Split it back into a separate fmuls and fadds and you'll miss a contracted target, and the reverse fails just as surely. Its double-precision twin drops the s to become fmadd, and the neighbors are fmsubs (a*b - c), fnmadds, and fnmsubs.
Back to the target for fma3. Its arguments sit in f1, f2, f3. Match those to a, b, c, walk the operand order, and you'll know which pair is multiplied and which value rides along as the addend.
Your task
Write fma3 taking three f32s so it compiles to the fmadds above. Write it as a plain expression — let the compiler fuse it.