[PATCH] D78997: [SLP] add another bailout for load-combine patterns

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 07:29:19 PDT 2020


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3711-3722
+bool BoUpSLP::isLoadCombineCandidate() const {
+  // Peek through a final sequence of stores and check if all operations are
+  // likely to be load-combined.
+  unsigned NumElts = VectorizableTree[0]->Scalars.size();
+  for (Value *Scalar : VectorizableTree[0]->Scalars) {
+    Value *X;
+    if (!match(Scalar, m_Store(m_Value(X), m_Value())) ||
----------------
ABataev wrote:
> Maybe make it a part of `isTreeTinyAndNotFullyVectorizable()` function?
I was against that in D67841 because:
"I don't think we should put this directly into isTreeTinyAndNotFullyVectorizable() though. In this case, the tree may not be tiny, and it may be fully vectorizable, so that would be wrong on both counts. :)"

Also, there's still hope that we can eventually remove these heuristics, so that will be simpler if we keep this logic independent.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78997/new/

https://reviews.llvm.org/D78997





More information about the llvm-commits mailing list