[PATCH] D80992: [CostModel] Unify getArithmeticInstrCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 03:16:39 PDT 2020


samparker marked an inline comment as done.
samparker added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:429
   EVT OrigTy = TLI->getValueType(DL, Ty);
+  // TODO: Is this reset of these values necessary?
+  if (CostKind != TTI::TCK_RecipThroughput) {
----------------
samparker wrote:
> samparker wrote:
> > dfukalov wrote:
> > > Am I right that this reset and TCK_RecipThroughput override in the following call are needed to avoid tests failures? If so, would you please specify errors - I'll try to get a look.
> > No test failures actually, so shall I just remove this instead?
> The RecipThroughput hack does cause a lot of failures, I was wondering whether hoisting some of the generic code here would be a better thing to do?
I tried hoisting from BasicTTI, but the v3 vector cost tests change like this:
-; FASTF64: estimated cost of 6 for {{.*}} fsub <3 x double>
-; SLOWF64: estimated cost of 9 for {{.*}} fsub <3 x double>
+; FASTF64: estimated cost of 8 for {{.*}} fsub <3 x double>
+; SLOWF64: estimated cost of 12 for {{.*}} fsub <3 x double>



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80992/new/

https://reviews.llvm.org/D80992





More information about the llvm-commits mailing list