[PATCH] D57875: [LegalizeTypes] Expand FNEG to bitwise op for IEEE FP types

Ana Pazos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 20:18:10 PST 2019


apazos created this revision.
Herald added subscribers: jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, niosHD, sabuasal, simoncook, johnrusso, rbar, javed.absar.

Except for custom floating point types x86_fp80 and ppc_fp128,
expand Y = FNEG(X) to Y = X ^ sign mask to avoid library call.
 Using bitwise operation can improve code size and performance.


https://reviews.llvm.org/D57875

Files:
  lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  test/CodeGen/ARM/legalize-fneg.ll
  test/CodeGen/RISCV/legalize-fneg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57875.185702.patch
Type: text/x-patch
Size: 5882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190207/9cef648e/attachment.bin>


More information about the llvm-commits mailing list