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 {
11748
11748
if (!DebugCounter::shouldExecute(VectorizedGraphs))
11749
11749
return true;
11750
11750
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
+
11751
11758
// No need to vectorize inserts of gathered values.
11752
11759
if (VectorizableTree.size() == 2 &&
11753
11760
isa<InsertElementInst>(VectorizableTree[0]->Scalars[0]) &&
@@ -11807,10 +11814,6 @@ bool BoUpSLP::isTreeTinyAndNotFullyVectorizable(bool ForReduction) const {
11807
11814
allSameBlock(VectorizableTree.back()->Scalars))
11808
11815
return false;
11809
11816
11810
- assert(VectorizableTree.empty()
11811
- ? ExternalUses.empty()
11812
- : true && "We shouldn't have any external users");
11813
-
11814
11817
// Otherwise, we can't vectorize the tree. It is both tiny and not fully
11815
11818
// vectorizable.
11816
11819
return true;
You can’t perform that action at this time.
0 commit comments