[PATCH] Resolve issues with fmuladd intrinsic handling across multiple backends

Lang Hames lhames at gmail.com
Mon Jul 8 10:50:40 PDT 2013


Hi Stephen,


> > The "and FMAs are legal" portion of the above comment is simply a lie;
> > the legality of FMA operations is not checked before lowering fmuladd
> > to ISD::FMA
>

> However, on further investigation, it seems like not checking the
> > legality of an FMA operation in lowering fmuladd intrinsics is a
> > feature, not a bug, since it allows formation of FMAs with types like
> > v16f32, as long as they legalize (via splitting, scalarization,
> > promotion, etc.) to types that support FMAs
>

Right - isFMAFasterThanMulAndAdd originally checked for legality (hence the
comment), but that was removed to support fusing in cases where the code
would eventually legalize.

This patch looks good to me. Thanks for working on it.

- Lang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130708/15094ac7/attachment.html>


More information about the llvm-commits mailing list