[PATCH] D121771: [RISCV] Add basic cost model for vector casting

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 23:01:17 PDT 2022


fakepaper56 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:227
+    if (auto SrcVTy = dyn_cast<VectorType>(Src)) {
+      if (!isTypeLegal(Src) || !isTypeLegal(Dst))
+        return BaseT::getCastInstrCost(Opcode, Dst, Src, CCH, CostKind, I);
----------------
craig.topper wrote:
> Do you intend to use getTypeLegalizationCost to do this properly in the future?
I think I should do it. But I am not sure how to do when the legalization costs are different between Dst and Src. I will also add FIXME here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121771



More information about the llvm-commits mailing list