llvm-project
e15e5e67 - [ISel] Improve `clmul` fallback implementation (#204802)

Commit
12 days ago
[ISel] Improve `clmul` fallback implementation (#204802) Generalize the approach from https://github.com/llvm/llvm-project/pull/203727 to narrower and wider integers. We still need the fallback for when multiplication isn't available, and it turns out that for some widths the fallback emits fewer instructions, the naive fallback is still used for `i1`, `i3`, `i4` and `i9`. I've also now enabled wider integers (`i128` and `i256` have uses in cryptography). Based on my local experiments, the Karatsuba approach (e.g. as in https://github.com/rust-lang/rust/pull/152132#discussion_r2778609222) is not actually better than zero extending the input and using multiplication with holes on the wider type. CC https://github.com/llvm/llvm-project/issues/203694 CC: @eisenwave
Author
Parents
Loading