[PATCH] D129072: [RISCV] Fix the scale of getIntMatCost and also need adjust for getIntImmCost

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 07:59:20 PDT 2022


craig.topper added a comment.

I’m not sure there was any bug here. See comment.



================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp:384
   bool IsRV64 = ActiveFeatures[RISCV::Feature64Bit];
   bool HasRVC = CompressionCost && ActiveFeatures[RISCV::FeatureStdExtC];
   int PlatRegSize = IsRV64 ? 64 : 32;
----------------
HasRVC also considers ‘CompressionCost’ so it only scaled the value when that was passed. TargetTransformInfo doesn’t set that flag.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129072



More information about the llvm-commits mailing list