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

Wang Pengcheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 8 20:26:45 PST 2023


pcwang-thead accepted this revision.
pcwang-thead added a comment.
This revision is now accepted and ready to land.

The code is OK to me, except that a few small 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);
----------------
The value type of `read_register` is `i32` in `llvm/test/CodeGen/RISCV/vlenb.ll`, but I don't insist on it.


================
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
----------------
Add `--check-globals` or `--global-value-regex` to check if the metadata is `vlenb` exactly?


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