[llvm] [SLP]Initial support for interleaved loads (PR #112042)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 04:41:04 PST 2024


================
@@ -11397,6 +11501,11 @@ bool BoUpSLP::isTreeTinyAndNotFullyVectorizable(bool ForReduction) const {
       }))
     return false;
 
+  if (VectorizableTree.back()->isGather() &&
+      VectorizableTree.back()->isAltShuffle() &&
+      VectorizableTree.back()->getVectorFactor() > 2)
+    return false;
+
   assert(VectorizableTree.empty()
              ? ExternalUses.empty()
              : true && "We shouldn't have any external users");
----------------
RonDahan101 wrote:

@alexey-bataev @preames 
Sorry for the post-review 
something here seems unsafe to me.
in line 11509 (inside the assert) we recognize the VectorizableTree could be empty. but in the 'if' statement before it, you do VectorizableTree.back() which in case VectorizableTree is empty will crash.

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


More information about the llvm-commits mailing list