Displaying 9 results from an estimated 9 matches for "canfuse".
2018 Aug 20
3
Condition code in DAGCombiner::visitFADDForFMACombine?
...se is this:
// Floating-point multiply-add with intermediate 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 AllowF...
2018 Aug 22
2
Condition code in DAGCombiner::visitFADDForFMACombine?
... 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))
>...
2018 Aug 22
4
Condition code in DAGCombiner::visitFADDForFMACombine?
...erationLegal(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 &...
2018 Aug 22
2
Condition code in DAGCombiner::visitFADDForFMACombine?
... 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.
> > ...
2018 Aug 23
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...;>> > 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.
>>> >...
2019 Jul 10
2
RFC: change -fp-contract=off to actually disable FMAs
...ouble %c) {
%mul = fmul fast double %b, %a
%add = fadd fast 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...
2018 Aug 23
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...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.
>>&...
2018 Aug 23
3
Condition code in DAGCombiner::visitFADDForFMACombine?
...ntractable(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 combin...
2018 Aug 23
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...>>>> > return F.hasAllowContract() ||
>>>> F.hasAllowReassociation();
>>>> > }
>>>> >
>>>> > bool CanFuse = Options.UnsafeFPMath ||
>>>> isContractable(N);
>>>> > bool AllowFusionGlobally =
>>>> (Options.AllowFPOpFusion ==
>>>> > FPOpFusion::Fast || CanFuse...