[PATCH] D79483: [CostModel] Replace getUserCost with getInstructionCost.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 02:58:52 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:505
+    // Assume a 3cy latency for fp arithmetic ops.
+    if (CostKind == TTI::TCK_Latency) {
+      if (Ty->getScalarType()->isFloatingPointTy())
----------------
samparker wrote:
> Would it be better, for now, to keep this in the X86 backend, if you need it there?
getInstructionLatency did have this as the default for all fp results

As well as x86 it causes one aarch64 sve fadd cost test to change from latency cost = 3 to 1 - not sure if thats enough of a reason to keep it generic or not?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79483



More information about the llvm-commits mailing list