File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -11748,6 +11748,13 @@ bool BoUpSLP::isTreeTinyAndNotFullyVectorizable(bool ForReduction) const {
1174811748 if (!DebugCounter::shouldExecute(VectorizedGraphs))
1174911749 return true;
1175011750
11751+ // Graph is empty - do nothing.
11752+ if (VectorizableTree.empty()) {
11753+ assert(ExternalUses.empty() && "We shouldn't have any external users");
11754+
11755+ return true;
11756+ }
11757+
1175111758 // No need to vectorize inserts of gathered values.
1175211759 if (VectorizableTree.size() == 2 &&
1175311760 isa<InsertElementInst>(VectorizableTree[0]->Scalars[0]) &&
@@ -11807,10 +11814,6 @@ bool BoUpSLP::isTreeTinyAndNotFullyVectorizable(bool ForReduction) const {
1180711814 allSameBlock(VectorizableTree.back()->Scalars))
1180811815 return false;
1180911816
11810- assert(VectorizableTree.empty()
11811- ? ExternalUses.empty()
11812- : true && "We shouldn't have any external users");
11813-
1181411817 // Otherwise, we can't vectorize the tree. It is both tiny and not fully
1181511818 // vectorizable.
1181611819 return true;
You can’t perform that action at this time.
0 commit comments