afonso360 opened PR #6587 from afonso360:riscv-simd-popcnt
to bytecodealliance:main
:
:wave: Hey,
This PR Implements the SIMD
popcnt
instruction for RISC-V. We don't have a native version of this, so we need to use one of the popular algorithms that is normally replaces the native instruction. This is the variant that LLVM uses.
afonso360 requested cfallin for a review on PR #6587.
afonso360 requested wasmtime-compiler-reviewers for a review on PR #6587.
afonso360 edited PR #6587:
:wave: Hey,
This PR Implements the SIMD
popcnt
instruction for RISC-V. We don't have a native version of this, so we need to use one of the popular algorithms that normally replaces the native instruction. This is the variant that LLVM uses.
afonso360 edited PR #6587:
:wave: Hey,
This PR Implements the SIMD
popcnt
instruction for RISC-V. We don't have a native version of this, so we need to use one of the popular algorithms that normally replaces the native instruction. This is the variant that LLVM uses for element types larger thani8
, they also have a shorter implementation fori8x16
, but I didn't implement it here.I also checked what V8 produces and they do a loop that sums each bit. In our case that would involve having a custom instruction and I didn't really want to do that.
afonso360 updated PR #6587.
itsrainy submitted PR review:
this looks good to me!
afonso360 merged PR #6587.
Last updated: Dec 23 2024 at 12:05 UTC