[llvm] r292031 - [NewGVN] Fix a warning from GCC.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 14 12:44:09 PST 2017
Author: davide
Date: Sat Jan 14 14:44:08 2017
New Revision: 292031
URL: http://llvm.org/viewvc/llvm-project?rev=292031&view=rev
Log:
[NewGVN] Fix a warning from GCC.
Patch by Gonsolo.
Differential Revision: https://reviews.llvm.org/D28731
Modified:
llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=292031&r1=292030&r2=292031&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Sat Jan 14 14:44:08 2017
@@ -1076,13 +1076,12 @@ void NewGVN::moveValueToNewCongruenceCla
// 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);
More information about the llvm-commits
mailing list