Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Apr 18, 2025

No description provided.

Copy link
Contributor Author

arsenm commented Apr 18, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm marked this pull request as ready for review April 18, 2025 18:08
@llvmbot
Copy link
Member

llvmbot commented Apr 18, 2025

@llvm/pr-subscribers-llvm-transforms

@llvm/pr-subscribers-vectorizers

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/136336.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+1-1)
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 4301bc7d0d68b..1c83d0a4813dd 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -6749,7 +6749,7 @@ BoUpSLP::getReorderingData(const TreeEntry &TE, bool TopToBottom,
     auto PHICompare = [&](unsigned I1, unsigned I2) {
       Value *V1 = TE.Scalars[I1];
       Value *V2 = TE.Scalars[I2];
-      if (V1 == V2 || (V1->getNumUses() == 0 && V2->getNumUses() == 0))
+      if (V1 == V2 || (V1->use_empty() && V2->use_empty()))
         return false;
       if (isa<PoisonValue>(V1))
         return true;

Copy link
Contributor Author

arsenm commented Apr 18, 2025

Merge activity

  • Apr 18, 3:12 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Apr 18, 3:14 PM EDT: A user merged this pull request with Graphite.

@arsenm arsenm merged commit e288670 into main Apr 18, 2025
17 checks passed
@arsenm arsenm deleted the users/arsenm/slp-vectorizer/check-use-empty-avoid-getNumUses branch April 18, 2025 19:14
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants