[PATCH] D66725: [DAGCombiner][TargetLowering] Target hook for FCOPYSIGN arg cast folding

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 16:05:51 PDT 2019


efriedma added a comment.

For FCOPYSIGN, specifically, LegalizeDAG is going to query the target to ask, "is FCOPYSIGN legal for result type X", using the getOperationAction() API?  The target has a few different ways to respond: here, the relevant possibilities are "Legal", "Expand", or "Custom".  I guess the issue here is that on RISCV, this query is returning "Legal", when it actually isn't legal for all combinations of legal result/input types?

If this is a problem for a bunch of targets, maybe we need a different API for expressing whether an FCOPYSIGN is legal.  I'd prefer to follow existing convention for other operations which involve multiple types, though; for example, see TargetLoweringBase::getLoadExtAction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66725/new/

https://reviews.llvm.org/D66725





More information about the llvm-commits mailing list