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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 14:21:19 PDT 2025


https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/136354

>From 87c5752308d935b97f08b09e39b4364f3a0f56e0 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Fri, 18 Apr 2025 19:24:18 +0200
Subject: [PATCH] ComplexDeinterleaving: Avoid using getNumUses

---
 llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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