[all-commits] [llvm/llvm-project] ed0307: [SLP] Support vectorizing 2^N-1 reductions (#106266)
Philip Reames via All-commits
all-commits at lists.llvm.org
Tue Aug 27 12:27:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ed03070eb349efcfb29056f98c2025219dfea6be
https://github.com/llvm/llvm-project/commit/ed03070eb349efcfb29056f98c2025219dfea6be
Author: Philip Reames <preames at rivosinc.com>
Date: 2024-08-27 (Tue, 27 Aug 2024)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/test/Transforms/SLPVectorizer/RISCV/vec3-base.ll
Log Message:
-----------
[SLP] Support vectorizing 2^N-1 reductions (#106266)
Build on the -slp-vectorize-non-power-of-2 experimental option, and
support vectorizing reductions with 2^N-1 sized vector.
Specifically, two related changes:
1) When searching for a profitable VL, start with the 2^N-1 reduction
width.
If cost model does not select that VL, return to power of two boundaries
when halfing the search VL. The later is mostly for simplicity.
2) Reduce the minimum reduction width from 4 to 3 when supporting
non-power
of two vectors. This is required to support <3 x Ty> cases.
One thing which isn't directly related to this change, but I want to
note for clarity is that the non-power-of-two vectorization appears to
be sensative to operand order of reduction. I haven't yet fully figured
out why, but I suspect this is non-power-of-two specific.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list