[PATCH] D157510: [RISCV] Implement intrinsics for XCVbitmanip extension in CV32E40P

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 13 20:50:03 PDT 2023


craig.topper added a comment.

In D157510#4583629 <https://reviews.llvm.org/D157510#4583629>, @melonedo wrote:

> In D157510#4573494 <https://reviews.llvm.org/D157510#4573494>, @craig.topper wrote:
>
>> Is there intended to be a header file that wraps the builtins? For other targets, builtins are considered an internal implementation detail and the real interface is the header file.  I'm trying to get a C interface approved for Zb* and Zk* standard extenions https://github.com/riscv-non-isa/riscv-c-api-doc/pull/44
>
> Discussions for this question are being hosted under https://github.com/openhwgroup/corev-llvm-project/issues/74. Before we reach a conclusion, I will implement these intrinsics in both versions, i.e., both llvm.ctpop and llvm.riscv.cv.bitmanip.cnt.

We can have a builtin in the frontend that maps to a target independent intrinsic. We already do this for __builtin_riscv_clz_32/64 and __builtin_riscv_ctz_32/64.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157510



More information about the llvm-commits mailing list