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

Zixuan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 19:13:06 PDT 2022


zixuan-wu added inline comments.


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp:395
   }
-  return std::max(1, Cost);
+  return std::max(100, Cost);
 }
----------------
craig.topper wrote:
> Doesn’t this prevent the function from being able to return 75 like it should for a single compressed instruction?
Right. I think we can just return the Cost directly.


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