summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-06-19 23:54:58 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-06-19 23:54:58 +0000
commite4c2e9b016c411cb75d3c1877007bace03d3b37f (patch)
tree31aa83dbaeaeac2d3c354fffd2ce0c5658497d04 /llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
parenta2ef1ba32f9d8da66105bb251ad3c1ec93511595 (diff)
downloadbcm5719-llvm-e4c2e9b016c411cb75d3c1877007bace03d3b37f.tar.gz
bcm5719-llvm-e4c2e9b016c411cb75d3c1877007bace03d3b37f.zip
AMDGPU: Consolidate some getGeneration checks
This is incomplete, and ideally these would all be removed, but it's better to localize them to the subtarget first with comments about what they're for. llvm-svn: 363902
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
index 37c8de93be5..1c17e6054f0 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
@@ -401,7 +401,7 @@ int GCNTTIImpl::getArithmeticInstrCost(
if (SLT == MVT::f64) {
int Cost = 4 * get64BitInstrCost() + 7 * getQuarterRateInstrCost();
// Add cost of workaround.
- if (ST->getGeneration() == AMDGPUSubtarget::SOUTHERN_ISLANDS)
+ if (!ST->hasUsableDivScaleConditionOutput())
Cost += 3 * getFullRateInstrCost();
return LT.first * Cost * NElts;
OpenPOWER on IntegriCloud