[llvm] d36ce05 - ComplexDeinterleaving: Avoid using getNumUses (#136354)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 14:26:45 PDT 2025


Author: Matt Arsenault
Date: 2025-04-18T23:26:43+02:00
New Revision: d36ce05237ce5e2c1f9d6cccc79e23241d661999

URL: https://github.com/llvm/llvm-project/commit/d36ce05237ce5e2c1f9d6cccc79e23241d661999
DIFF: https://github.com/llvm/llvm-project/commit/d36ce05237ce5e2c1f9d6cccc79e23241d661999.diff

LOG: ComplexDeinterleaving: Avoid using getNumUses (#136354)

Added: 
    

Modified: 
    llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
index a83982de14b28..c14b50120b16e 100644
--- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
+++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
@@ -1168,7 +1168,7 @@ ComplexDeinterleavingGraph::identifyReassocNodes(Instruction *Real,
       // the latter case, we will attempt to separately identify the complex
       // operation from here in order to create a shared
       // ComplexDeinterleavingCompositeNode.
-      if (I != Insn && I->getNumUses() > 1) {
+      if (I != Insn && I->hasNUsesOrMore(2)) {
         LLVM_DEBUG(dbgs() << "Found potential sub-expression: " << *I << "\n");
         Addends.emplace_back(I, IsPositive);
         continue;


        


More information about the llvm-commits mailing list