Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 7c93b6c

Browse files
committed
[Dominators] Update DominatorTree compare in case roots are different
The compare function, unusually, returns false on same, true on different. This fixes the conditions for different roots. Reviewed as a part of D41298. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325517 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b647677 commit 7c93b6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/llvm/Support/GenericDomTree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ class DominatorTreeBase {
319319
if (Parent != Other.Parent) return true;
320320

321321
if (Roots.size() != Other.Roots.size())
322-
return false;
322+
return true;
323323

324324
if (!std::is_permutation(Roots.begin(), Roots.end(), Other.Roots.begin()))
325-
return false;
325+
return true;
326326

327327
const DomTreeNodeMapType &OtherDomTreeNodes = Other.DomTreeNodes;
328328
if (DomTreeNodes.size() != OtherDomTreeNodes.size())

0 commit comments

Comments
 (0)