llvm-project
d28ed29d - [TTI][WebAssembly] Pairwise reduction expansion (#93948)

Commit
1 year ago
[TTI][WebAssembly] Pairwise reduction expansion (#93948) WebAssembly doesn't support horizontal operations nor does it have a way of expressing fast-math or reassoc flags, so runtimes are currently unable to use pairwise operations when generating code from the existing shuffle patterns. This patch allows the backend to select which, arbitary, shuffle pattern to be used per reduction intrinsic. The default behaviour is the same as the existing, which is by splitting the vector into a top and bottom half. The other pattern introduced is for a pairwise shuffle. WebAssembly enables pairwise reductions for int/fp add/sub.
Author
Parents
Loading