riscv-non-isa / rvv-intrinsic-doc

https://jira.riscv.org/browse/RVG-153
BSD 3-Clause "New" or "Revised" License
277 stars 88 forks source link

`vfirst` and `vcpop` return types unexpectedly changed #342

Closed nick-knight closed 1 month ago

nick-knight commented 1 month ago

(Cross-posting https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/287#issuecomment-2159273686 to a new issue.)

In https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/287, the return values for the vcpop and vfirst intrinsics were switched from unsigned long and long to unsigned int and int, while the implementations in upstream LLVM and GCC still have the former types. This API change appears to have been made in this PR, with the following justification:

Replace float16_t with _Float16 that is now supported by both LLVM and GCC. This keeps us away from the need to define our own type. (Resolves https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/31, and alongside also resolves https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/166.

FP16 is not relevant to those two issues, and the change made in this PR was not the agreed-upon solution to those issues. (I don't know if we had even come to a consensus: I had argued for a different solution altogether.)

At this point, I suggest we just revert this part of https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/287.

rofirrim commented 1 month ago

Cherry-picked into v1.0.x

ca4156a5705c12d6b9b2fd5f72b018bcb9dd3623 4ba136cca3218ce86b8e0c60e396aa575446f3a3 eccc2e090f280f5e36b1a8728c9f3d818ea156aa