llvm-project
f15666db - [SLP] Inefficient cost-modelling and codegen for reductions with slp-… (#197875)

Commit
59 days ago
[SLP] Inefficient cost-modelling and codegen for reductions with slp-… (#197875) …revec When revectorizing, starting with reduction, SLP generates slightly inefficient code for reduction. e.g. In the godbolt link [here](https://godbolt.org/z/ez7KPnxM5), `hor_reduction --> original code` `hor_reduction_revec_as_imagined_in_SLP --> revectorized code would look like` Rather than extracting per lane, we can extract original leaf nodes of the reduction, which are sub-vectors, and then perform usual reduction as in non-revectorized code. In the above link, `hor_reduction_ideal_revec --> how the revec code should look like` Extracting subvectors and achieving the reduction result would be better than extracting per lane and achieving the same result.
Author
Parents
Loading