Skip to content

Commit 92c8eda

Browse files
committed
Remove UnsafeFPMath in AMDGPUTargetTransformInfo.cpp
1 parent 22c952f commit 92c8eda

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,6 @@ InstructionCost GCNTTIImpl::getArithmeticInstrCost(
597597
// Estimate all types may be fused with contract/unsafe flags
598598
const TargetOptions &Options = TLI->getTargetMachine().Options;
599599
if (Options.AllowFPOpFusion == FPOpFusion::Fast ||
600-
Options.UnsafeFPMath ||
601600
(FAdd->hasAllowContract() && CxtI->hasAllowContract()))
602601
return TargetTransformInfo::TCC_Free;
603602
}
@@ -650,8 +649,7 @@ InstructionCost GCNTTIImpl::getArithmeticInstrCost(
650649
return LT.first * Cost * NElts;
651650
}
652651

653-
if (SLT == MVT::f32 && ((CxtI && CxtI->hasApproxFunc()) ||
654-
TLI->getTargetMachine().Options.UnsafeFPMath)) {
652+
if (SLT == MVT::f32 && (CxtI && CxtI->hasApproxFunc())) {
655653
// Fast unsafe fdiv lowering:
656654
// f32 rcp
657655
// f32 fmul

0 commit comments

Comments
 (0)