Index: lib/Transforms/Scalar/NewGVN.cpp =================================================================== --- lib/Transforms/Scalar/NewGVN.cpp +++ lib/Transforms/Scalar/NewGVN.cpp @@ -1077,12 +1077,15 @@ // instruction. We simply check that the member instruction does not properly // dominate the new class leader. assert( - !isa(NewClass->RepLeader) || !NewClass->RepLeader || + ( + !isa(NewClass->RepLeader) || + !NewClass->RepLeader || I == NewClass->RepLeader || - (!DT->properlyDominates( - I->getParent(), - cast(NewClass->RepLeader)->getParent()) && - "New class for instruction should not be dominated by instruction")); + !DT->properlyDominates( + I->getParent(), + cast(NewClass->RepLeader)->getParent()) + ) && + "New class for instruction should not be dominated by instruction"); if (NewClass->RepLeader != I) { auto DFSNum = InstrDFS.lookup(I);