]> granicus.if.org Git - llvm/commitdiff
[NewGVN] Fix a warning from GCC.
authorDavide Italiano <davide@freebsd.org>
Sat, 14 Jan 2017 20:44:08 +0000 (20:44 +0000)
committerDavide Italiano <davide@freebsd.org>
Sat, 14 Jan 2017 20:44:08 +0000 (20:44 +0000)
Patch by Gonsolo.
Differential Revision:  https://reviews.llvm.org/D28731

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292031 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/NewGVN.cpp

index 50ccffc6cca8009641533234b6d93ed1f79ae601..9f7d4b0265aebabd140e0565e60faa0c01b57dea 100644 (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);