mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
When propagating equalities, eg replacing A with B in every basic block
dominated by Root, check that B is available throughout the scope. This is obviously true (famous last words?) given the current logic, but the check may be helpful if more complicated reasoning is added one day. llvm-svn: 153323
This commit is contained in:
parent
1ac68ded1a
commit
fcc4791c7b
@ -2001,6 +2001,9 @@ bool GVN::propagateEquality(Value *LHS, Value *RHS, BasicBlock *Root) {
|
||||
LVN = RVN;
|
||||
}
|
||||
}
|
||||
assert((!isa<Instruction>(RHS) ||
|
||||
DT->properlyDominates(cast<Instruction>(RHS)->getParent(), Root)) &&
|
||||
"Instruction doesn't dominate scope!");
|
||||
|
||||
// If value numbering later deduces that an instruction in the scope is equal
|
||||
// to 'LHS' then ensure it will be turned into 'RHS'.
|
||||
|
Loading…
Reference in New Issue
Block a user