Skip to content

Commit bc35f06

Browse files
committedFeb 19, 2018
[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. llvm-svn: 325517
1 parent a7c457d commit bc35f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎llvm/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)
Please sign in to comment.