[LLVMdev] RFC: Add ISD nodes for mad
Mehdi Amini
mehdi.amini at apple.com
Wed Jan 28 17:15:43 PST 2015
> On Jan 28, 2015, at 4:54 PM, Owen Anderson <resistor at mac.com> wrote:
>
>>
>> On Jan 28, 2015, at 3:47 PM, Hal Finkel <hfinkel at anl.gov <mailto:hfinkel at anl.gov>> wrote:
>>
>> ----- Original Message -----
>>> From: "Matt Arsenault" <Matthew.Arsenault at amd.com <mailto:Matthew.Arsenault at amd.com>>
>>> To: "llvmdev at cs.uiuc.edu <mailto:llvmdev at cs.uiuc.edu>" <LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>>
>>> Sent: Wednesday, January 28, 2015 1:52:59 PM
>>> Subject: [LLVMdev] RFC: Add ISD nodes for mad
>>>
>>> Hi,
>>>
>>> I would like to add an ISD node for an fmad operation (named either
>>> FMAD
>>> or FMULADD). It will have the semantics of returning the same result
>>> as
>>> the separate multiply and add with the intermediate rounding step,
>>> and
>>> not a differently rounded result. The motivation is to share code
>>> with
>>> the various FMA forming DAG combines, but will be generally more
>>> useful
>>> on targets that support it since it is OK to form without non-default
>>> -fp-contract modes.
>>
>> Why not just reuse the existing FMA node, but add an additional parameter to indicate whether enhanced intermediate precision is required?
>
> Because that would break a lot of existing backends?
Can’t you have “optional” parameters? I mean the number of parameter you can add to a node is never checked or defined, it is implicit from the ISD OpCode AFAIK.
If you add a parameter to FMA, wouldn’t it just be ignored by the existing backends?
—
Mehdi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150128/4630c7ef/attachment.html>
More information about the llvm-dev
mailing list