This is an archive of the discontinued LLVM Phabricator instance.

[SLPVectorizer] Add basic support for mul/and/or/xor horizontal reductions
ClosedPublic

Authored by RKSimon on Oct 20 2018, 8:53 AM.

Details

Summary

Expand arithmetic reduction to include mul/and/or/xor instructions.

This patch just fixes the SLPVectorizer - the effective reduction costs for AVX1+ are still poor (see rL344846) and will need to be improved before SLP sees this as a valid transform - but we can already see the effect on SSE2 tests.

This only partially helps PR37731, but doesn't fix it all as it still falls over on the extraction/reduction order for some reason.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Oct 20 2018, 8:53 AM
This revision is now accepted and ready to land.Oct 22 2018, 8:19 AM
This revision was automatically updated to reflect the committed changes.