summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-01-14 20:44:08 +0000
committerDavide Italiano <davide@freebsd.org>2017-01-14 20:44:08 +0000
commit6d28500ff950003a0b8ea8709fc62957603af456 (patch)
treebd64190bfe25d3edddaf6254f99a67d594678ee4
parent4d5a9172875c0718ee9472c72765f2b5ef7c92dd (diff)
downloadbcm5719-llvm-6d28500ff950003a0b8ea8709fc62957603af456.tar.gz
bcm5719-llvm-6d28500ff950003a0b8ea8709fc62957603af456.zip
[NewGVN] Fix a warning from GCC.
Patch by Gonsolo. Differential Revision: https://reviews.llvm.org/D28731 llvm-svn: 292031
-rw-r--r--llvm/lib/Transforms/Scalar/NewGVN.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index 50ccffc6cca..9f7d4b0265a 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -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);
OpenPOWER on IntegriCloud