[PATCH] D70426: [DAGCombiner][RISCV] Avoid FCOPYSIGN folding of legalizing operand casts
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 02:54:50 PST 2019
luismarques created this revision.
luismarques added reviewers: efriedma, asb, lenary.
Herald added subscribers: llvm-commits, apazos, sameer.abuasal, pzheng, s.egerton, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, MaskRay, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
Herald added a project: LLVM.
This patch is an alternative to D66725 <https://reviews.llvm.org/D66725>. It gates the DAG combine folding of `fp_extend`/`fp_round` "casts" of an fcopysign sign operand when doing so would produce an operand value with an illegal type. (The folding is still done when the original sign value already had an illegal type, as in that case we expect the fcopysign to be expanded and we avoid libcalls for the value extension/rounding).
For clarity, the patch includes the RISC-V tests that motivated the DAGCombiner changes, although those can be committed separately.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70426
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoD.td
llvm/test/CodeGen/AArch64/vector-fcopysign.ll
llvm/test/CodeGen/RISCV/copysign-casts.ll
llvm/test/CodeGen/X86/combine-fcopysign.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70426.230017.patch
Type: text/x-patch
Size: 11326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191119/04955bfa/attachment.bin>
More information about the llvm-commits
mailing list