[PATCH] D141032: [Clang][RISCV] Expose vlenb to user

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 8 21:18:03 PST 2023


craig.topper added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:1579
+      llvm::Function *F =
+        CGM.getIntrinsic(llvm::Intrinsic::read_register, {Int64Ty});
+      return Builder.CreateCall(F, Metadata);
----------------
pcwang-thead wrote:
> The value type of `read_register` is `i32` in `llvm/test/CodeGen/RISCV/vlenb.ll`, but I don't insist on it.
Doesn't this need to match the size of long?


================
Comment at: clang/test/CodeGen/RISCV/rvv-intrinsics/vlenb.c:1
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// REQUIRES: riscv-registered-target
----------------
pcwang-thead wrote:
> Add `--check-globals` or `--global-value-regex` to check if the metadata is `vlenb` exactly?
Please test riscv32 as well


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141032



More information about the cfe-commits mailing list