[PATCH] Add generic fmad DAG node

Matt Arsenault arsenm2 at gmail.com
Fri Feb 20 14:12:59 PST 2015


> On Feb 18, 2015, at 3:38 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:
> 
>> 
>> On Feb 17, 2015, at 7:49 PM, Hal Finkel <hfinkel at anl.gov <mailto: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
> <0001-Add-generic-fmad-DAG-node.patch>


r230070-230071
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150220/3a761e87/attachment.html>


More information about the llvm-commits mailing list