search for: allowfusionglobally

Displaying 10 results from an estimated 10 matches for "allowfusionglobally".

2018 Aug 20
3
Condition code in DAGCombiner::visitFADDForFMACombine?
...ate rounding. bool HasFMAD = (LegalOperations && TLI.isOperationLegal(ISD::FMAD, VT)); static bool isContractable(SDNode *N) { SDNodeFlags F = N->getFlags(); return F.hasAllowContract() || F.hasAllowReassociation(); } bool CanFuse = Options.UnsafeFPMath || isContractable(N); bool AllowFusionGlobally = (Options.AllowFPOpFusion == FPOpFusion::Fast || CanFuse || HasFMAD); // If the addition is not contractable, do not combine. if (!AllowFusionGlobally && !isContractable(N)) return SDValue(); Specifically the AllowFusionGlobally, I would have expected something more like: bool AllowF...
2018 Aug 22
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...perationLegal(ISD::FMAD, VT)); > > static bool isContractable(SDNode *N) { >   SDNodeFlags F = N->getFlags(); >   return F.hasAllowContract() || F.hasAllowReassociation(); > } > > bool CanFuse = Options.UnsafeFPMath || isContractable(N); > bool AllowFusionGlobally = (Options.AllowFPOpFusion == > FPOpFusion::Fast || CanFuse || HasFMAD); > // If the addition is not contractable, do not combine. > if (!AllowFusionGlobally && !isContractable(N)) >     return SDValue(); > > Specifically the AllowFusionGlobally, I wo...
2018 Aug 22
4
Condition code in DAGCombiner::visitFADDForFMACombine?
...sContractable(SDNode *N) { > >        SDNodeFlags F = N->getFlags(); > >        return F.hasAllowContract() || F.hasAllowReassociation(); > >     } > > > >     bool CanFuse = Options.UnsafeFPMath || isContractable(N); > >     bool AllowFusionGlobally = (Options.AllowFPOpFusion == > >     FPOpFusion::Fast || CanFuse || HasFMAD); > >     // If the addition is not contractable, do not combine. > >     if (!AllowFusionGlobally && !isContractable(N)) > >          return SDValue(); > > &g...
2018 Aug 22
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...s F = N->getFlags(); > >      >        return F.hasAllowContract() || > F.hasAllowReassociation(); > >      >     } > >      > > >      >     bool CanFuse = Options.UnsafeFPMath || isContractable(N); > >      >     bool AllowFusionGlobally = (Options.AllowFPOpFusion == > >      >     FPOpFusion::Fast || CanFuse || HasFMAD); > >      >     // If the addition is not contractable, do not combine. > >      >     if (!AllowFusionGlobally && !isContractable(N)) > >      >     ...
2018 Aug 23
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...; SDNodeFlags F = N->getFlags(); >>> > return F.hasAllowContract() || F.hasAllowReassociation(); >>> > } >>> > >>> > bool CanFuse = Options.UnsafeFPMath || isContractable(N); >>> > bool AllowFusionGlobally = (Options.AllowFPOpFusion == >>> > FPOpFusion::Fast || CanFuse || HasFMAD); >>> > // If the addition is not contractable, do not combine. >>> > if (!AllowFusionGlobally && !isContractable(N)) >>> > ret...
2018 Aug 23
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...F = N->getFlags(); >>>> > return F.hasAllowContract() || F.hasAllowReassociation(); >>>> > } >>>> > >>>> > bool CanFuse = Options.UnsafeFPMath || isContractable(N); >>>> > bool AllowFusionGlobally = (Options.AllowFPOpFusion == >>>> > FPOpFusion::Fast || CanFuse || HasFMAD); >>>> > // If the addition is not contractable, do not combine. >>>> > if (!AllowFusionGlobally && !isContractable(N)) >>>> &...
2018 Aug 23
3
Condition code in DAGCombiner::visitFADDForFMACombine?
...); >>>>> > return F.hasAllowContract() || F.hasAllowReassociation(); >>>>> > } >>>>> > >>>>> > bool CanFuse = Options.UnsafeFPMath || isContractable(N); >>>>> > bool AllowFusionGlobally = (Options.AllowFPOpFusion == >>>>> > FPOpFusion::Fast || CanFuse || HasFMAD); >>>>> > // If the addition is not contractable, do not combine. >>>>> > if (!AllowFusionGlobally && !isContractable(N)) >>&gt...
2018 Aug 23
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...); >>>> > } >>>> > >>>> > bool CanFuse = Options.UnsafeFPMath || >>>> isContractable(N); >>>> > bool AllowFusionGlobally = >>>> (Options.AllowFPOpFusion == >>>> > FPOpFusion::Fast || CanFuse || HasFMAD); >>>> > // If the addition is not >>>> contractable, do not combine....
2019 Jul 10
2
RFC: change -fp-contract=off to actually disable FMAs
...ast double %mul, %c ret double %add } $ llc -mattr=+fma fma.ll -fp-contract=off -o - | grep vfmadd vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2 It still generates an fma due to the logic in DAGCombiner: bool CanFuse = Options.UnsafeFPMath || isContractable(N); bool AllowFusionGlobally = (Options.AllowFPOpFusion == FPOpFusion::Fast || CanFuse || HasFMAD); In this case, UnsafeFPMath is false but isContractable() is true since the FADD node is tagged as 'fast'. A simple fix would just be to check for -fp-contract=off, however, I also found t...
2018 Aug 21
3
Condition code in DAGCombiner::visitFADDForFMACombine?
> 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.