Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Apr 25, 2025

No description provided.

Copy link
Contributor Author

arsenm commented Apr 25, 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 25, 2025 15:30
@llvmbot
Copy link
Member

llvmbot commented Apr 25, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Matt Arsenault (arsenm)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/BypassSlowDivision.cpp (+1-1)
diff --git a/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp b/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
index ee91eeb96fe3e..7343c7913ecd0 100644
--- a/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
+++ b/llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
@@ -457,7 +457,7 @@ bool llvm::bypassSlowDivision(BasicBlock *BB,
     Next = Next->getNextNode();
 
     // Ignore dead code to save time and avoid bugs.
-    if (I->hasNUses(0))
+    if (I->use_empty())
       continue;
 
     FastDivInsertionTask Task(I, BypassWidths);

@arsenm arsenm merged commit a214084 into main Apr 25, 2025
16 checks passed
@arsenm arsenm deleted the users/arsenm/bypass-slow-division/use-empty branch April 25, 2025 17:01
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