[llvm] [WebAssembly] Autovec support for dot (PR #123207)

Sam Parker via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 00:45:53 PST 2025


sparker-arm wrote:

> or maybe now that you've implemented getPartialReductionCost?

Correct, but with the caveat that it won't trigger at the moment due to the vectorization factor selected. For our dot, we need a factor of 8 or 16 but, AFAICT, the vectorizer will not go above 4 as we are using an i32 for the arithmetic. The tests that shows dot being generated are doing so because I've used the `-vectorizer-maximize-bandwidth` option. This hook can be implemented in the backend too, but I'm not convinced that's the best approach. I think some extra work will be needed in the vectorizer to explore a wider vector factor, based upon the input widths, for these partial reductions.

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


More information about the llvm-commits mailing list