[PATCH] Add generic fmad DAG node

Matt Arsenault arsenm2 at gmail.com
Wed Feb 18 15:38:55 PST 2015


> On Feb 17, 2015, at 7:49 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> 
> Hi Matt,
> 
> Regarding the patch to "Reword fmuladd documentation slightly", I'd rather we didn't. I'd rather we talk about 'fusion' of the multiply and the add only in the 'fma' sense (where there is extended intermediate precision). This is a mathematical concept that is well-defined at the IR level. If there is no extended intermediate precision, how the backend chooses to express the operations at the assembly level is irrelevant (one instruction, two instructions, 18 instructions, whatever). I realize that you're also thinking of fmad as a kind of fusion, and operationally that's true, but I don't think it is relevant to the definition of the IR.
> 
> Regarding the SDAG patch:
> 
> +    /// Ternary floating point operators.
> +    FMA, FMAD,
> 
> Please include a brief comment about how these differ.
> 
> +    // XXX - This might be convenient for some targets to lower if some
> +    // subtarget doesn't support it.
> 
> I'd remove this comment.
> 
> +    llvm_unreachable("illegal fmad should never be formed");
> 
> illegal -> Illegal
> 
> Otherwise, LGTM.
> 
> -Hal



Updated version with fixed comments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150218/cd2d75cb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-generic-fmad-DAG-node.patch
Type: application/octet-stream
Size: 17481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150218/cd2d75cb/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150218/cd2d75cb/attachment-0001.html>


More information about the llvm-commits mailing list