[NewGVN] Fix a warning from GCC.

Patch by Gonsolo.
Differential Revision:  https://reviews.llvm.org/D28731

llvm-svn: 292031
This commit is contained in:
Davide Italiano 2017-01-14 20:44:08 +00:00
parent 4d5a917287
commit 6d28500ff9
1 changed files with 6 additions and 7 deletions

View File

@ -1076,13 +1076,12 @@ void NewGVN::moveValueToNewCongruenceClass(Instruction *I,
// dominator tree, or the new class leader should dominate the new member
// instruction. We simply check that the member instruction does not properly
// dominate the new class leader.
assert(
!isa<Instruction>(NewClass->RepLeader) || !NewClass->RepLeader ||
I == NewClass->RepLeader ||
!DT->properlyDominates(
I->getParent(),
cast<Instruction>(NewClass->RepLeader)->getParent()) &&
"New class for instruction should not be dominated by instruction");
assert((!isa<Instruction>(NewClass->RepLeader) || !NewClass->RepLeader ||
I == NewClass->RepLeader ||
!DT->properlyDominates(
I->getParent(),
cast<Instruction>(NewClass->RepLeader)->getParent())) &&
"New class for instruction should not be dominated by instruction");
if (NewClass->RepLeader != I) {
auto DFSNum = InstrDFS.lookup(I);