[PATCH] D70426: [DAGCombiner][RISCV] Avoid FCOPYSIGN folding of legalizing operand casts
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 03:51:37 PST 2019
asb added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoD.td:234
def : Pat<(fcopysign FPR64:$rs1, (fneg FPR64:$rs2)), (FSGNJN_D $rs1, $rs2)>;
+def : Pat<(fcopysign FPR64:$rs1, FPR32:$rs2), (FSGNJ_D $rs1, (FCVT_D_S $rs2))>;
+def : Pat<(fcopysign FPR32:$rs1, FPR64:$rs2), (FSGNJ_S $rs1, (FCVT_S_D $rs2, 0b111))>;
----------------
luismarques wrote:
> lenary wrote:
> > Please can you add a comment to note that these patterns will eventually not be needed, once we improve fcopysign handling?
> Although that was my original plan, there doesn't seem to be review consensus yet that such changes will be coming and accepted. (If only this patch was committed we would be left at a reasonable place, even if not perfect.)
I take your point about not wanting to describe future plans where there might not be consensus. I'd put a brief sentence like "These patterns can be removed if..."
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70426/new/
https://reviews.llvm.org/D70426
More information about the llvm-commits
mailing list