[PATCH] R600/SI: Use source modifiers for f64 fabs / fneg

Matt Arsenault arsenm2 at gmail.com
Wed Aug 6 18:56:37 PDT 2014


On Aug 6, 2014, at 10:34 AM, Matt Arsenault <arsenm2 at gmail.com> wrote:

> 
> On Aug 6, 2014, at 12:25 AM, Michel Dänzer <michel at daenzer.net> wrote:
> 
>> 
>>> Here is an updated set that implements that for f64. These also
>>> switch to preferring using the literal constant as the first operand,
>>> rather than loading the immediate into a register.
>> 
>> Sounds good, but I have to defer to Tom or others for review.
>> 
> 
> I think I’m going to go back on this. It’s mostly a cosmetic change in the scalar case, trading a move of an immediate for one from an SGPR to VGPR. In the vector case, this would require N SGPR copies, but the other way the SGPRs could stay and only 1 copy of the immediate would need to be loaded.



These switch back to preferring the old order of literal loaded into a VGPR, and remove the FABS_SI / FNEG_SI pseudoinstructions. I don’t see any need for them anymore, and the pattern can directly match the instructions


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-R600-SI-Refactor-fneg-fabs-patterns.patch
Type: application/octet-stream
Size: 2036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-R600-SI-Use-source-modifier-for-f64-fabs.patch
Type: application/octet-stream
Size: 6397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-R600-SI-Use-source-modifiers-for-f64-fneg.patch
Type: application/octet-stream
Size: 10622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment-0002.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-R600-SI-Move-all-fabs-fneg-handling-to-patterns.patch
Type: application/octet-stream
Size: 17720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment-0003.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140806/0b013646/attachment-0004.html>


More information about the llvm-commits mailing list