Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Sep 23, 2024

@llvm/pr-subscribers-backend-arm

Author: Kazu Hirata (kazutakahirata)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp (+1-2)
diff --git a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
index a4598de96fa3b4..e7dfbfb64fa521 100644
--- a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
+++ b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
@@ -144,10 +144,9 @@ namespace {
     void ProcessLoop() {
       std::function<void(MachineBasicBlock *)> Search =
           [this, &Search](MachineBasicBlock *MBB) -> void {
-        if (Visited.count(MBB))
+        if (!Visited.insert(MBB).second)
           return;
 
-        Visited.insert(MBB);
         for (auto *Succ : MBB->successors()) {
           if (!ML.contains(Succ))
             continue;

@kazutakahirata kazutakahirata merged commit cee6509 into llvm:main Sep 23, 2024
@kazutakahirata kazutakahirata deleted the cleanup_001_repeated_hash_ARMLowOverheadLoops branch September 23, 2024 13:42
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.

3 participants