mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 22:43:29 +00:00
It is not possible to determine dominance between two PHI nodes
based on their ordering. This is applicable to ETForest::dominates() also. llvm-svn: 35423
This commit is contained in:
parent
cf7d99a731
commit
7cde72cbc1
@ -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<PHINode>(A) && isa<PHINode>(B))
|
||||
return false;
|
||||
|
||||
if(!IsPostDominators) {
|
||||
// A dominates B if it is found first in the basic block.
|
||||
return &*I == A;
|
||||
|
Loading…
Reference in New Issue
Block a user