[PATCH] D136662: [VP][RISCV] Add vp.rint and RISC-V support.

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 15:19:23 PDT 2022


fakepaper56 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:518
+    auto LT = getTypeLegalizationCost(RetTy);
+    return Cost + (LT.first - 1);
+  }
----------------
craig.topper wrote:
> Why is LT.first added? Shouldn't it be multiplied?   stepvector is special because if LT.first > 1, it's a single vid.v and LT.first-1 adds.
Yes, you are right.  And also I think it is terrible mistake and I will reflect on my careless code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136662



More information about the llvm-commits mailing list