From: Devang Patel Date: Wed, 28 Mar 2007 14:57:43 +0000 (+0000) Subject: It is not possible to determine dominance between two PHI nodes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9dea3a340a8e3db7eab92ea78c20e317ac4c2545;p=oota-llvm.git It is not possible to determine dominance between two PHI nodes based on their ordering. This is applicable to ETForest::dominates() also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35423 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 1421cf14e7d..9bd51bf4d91 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -952,6 +952,11 @@ bool ETForestBase::dominates(Instruction *A, Instruction *B) { BasicBlock::iterator I = BBA->begin(); for (; &*I != A && &*I != B; ++I) /*empty*/; + // It is not possible to determine dominance between two PHI nodes + // based on their ordering. + if (isa(A) && isa(B)) + return false; + if(!IsPostDominators) { // A dominates B if it is found first in the basic block. return &*I == A;