[PATCH] Add generic fmad DAG node

Hal Finkel hfinkel at anl.gov
Tue Feb 17 19:49:05 PST 2015


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

----- Original Message -----
> From: "Matt Arsenault" <arsenm2 at gmail.com>
> To: "llvm-commits" <llvm-commits at cs.uiuc.edu>
> Cc: "Hal J. Finkel" <hfinkel at anl.gov>, "Owen Anderson" <resistor at mac.com>
> Sent: Monday, February 16, 2015 7:42:17 PM
> Subject: [PATCH] Add generic fmad DAG node
> 
> 
> 
> Hi,
> 
> 
> These implement the fmad DAG node I posted about before (
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081372.html
> )
> 
> 
> -Matt
> 
> 
> 
> 
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list