[llvm-dev] Condition code in DAGCombiner::visitFADDForFMACombine?

Ryan Taylor via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 21 10:31:30 PDT 2018


The code issue for me seems to be here:
  // Is the node an FMUL and contractable either due to global flags or
  // SDNodeFlags.
  auto isContractableFMUL = [AllowFusionGlobally](SDValue N) {
    if (N.getOpcode() != ISD::FMUL)
      return false;
    return AllowFusionGlobally || isContractable(N.getNode());
  };

The problem is that I'd like to have fast math set but also no contract
nodes that don't specifically have contract/reassoc.

On Tue, Aug 21, 2018 at 11:04 AM Matt Arsenault <arsenm2 at gmail.com> wrote:

>
>
> > On Aug 21, 2018, at 17:57, Ryan Taylor <ryta1203 at gmail.com> wrote:
> >
> > Matt,
> > I'm sorry, actually it's fma not fmad.
> >
> > In the post-legalizer DAG combine for the given code it's producing fma
> not fmad. That doens't seem correct.
> >
>
> The contract is on the fadd. I’m not really sure what the rule is supposed
> to be for contract between the nodes. The LangRef doesn’t clarify on this.
> I would assume it would need to be present on both?
>
> -Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180821/71310268/attachment.html>


More information about the llvm-dev mailing list