[llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 03:20:45 PDT 2024


================
@@ -2806,6 +2810,9 @@ class BoUpSLP {
                           SmallVectorImpl<Value *> *OpScalars = nullptr,
                           SmallVectorImpl<Value *> *AltScalars = nullptr) const;
 
+    /// Return true if this is a non-power-of-2 node.
+    bool isNonPowOf2Vec() const { return !isPowerOf2_32(Scalars.size()); }
----------------
fhahn wrote:

All code paths should guard against that AFAICT. I added an assertion to make sure. Couldn't find any test case that triggers this  across large code bases (SPEC2006, SPEC2017, llvm-test-suite, clang bootstrap and large internal benchmarks)

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


More information about the llvm-commits mailing list