[llvm] [IR] Add llvm `clmul` intrinsic (PR #140301)

Oscar Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 06:31:57 PDT 2025


oscardssmith wrote:

@artagnon IMO this is useful for more than CRC optimization. My original reason for wanting this was wanting to play around with clmul as a component of fast integer hash functions, (specifically I wanted a hash that distributes over the cartesian product and clmul makes for a very fast version of this hash).

More generally, if there is a CPU instruction across x86, arm, and riscv, that seems like a pretty good argument for having an LLVM intrinsic rather than 3 separate processor specific intrinsics.

https://github.com/llvm/llvm-project/pull/140301


More information about the llvm-commits mailing list