From a9033aaba22a601b255cb659ff6a58ad753756c3 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 9 Aug 2017 09:29:09 +0000 Subject: [PATCH] [ZoneAlgo] Consolditate condition. NFC. No need to create an OptimizationRemarkMissed object if we are not going to use it anyway. llvm-svn: 310454 --- polly/lib/Transform/ZoneAlgo.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/polly/lib/Transform/ZoneAlgo.cpp b/polly/lib/Transform/ZoneAlgo.cpp index 70105f5ac2281..6215199aeda8a 100644 --- a/polly/lib/Transform/ZoneAlgo.cpp +++ b/polly/lib/Transform/ZoneAlgo.cpp @@ -353,16 +353,15 @@ bool ZoneAlgorithm::isCompatibleStmt(ScopStmt *Stmt) { } // Do not allow more than one store to the same location. - if (!isl_union_map_is_disjoint(Stores.keep(), AccRel.keep())) { + if (!isl_union_map_is_disjoint(Stores.keep(), AccRel.keep()) && + !onlySameValueWrites(Stmt)) { OptimizationRemarkMissed R(PassName, "StoreAfterStore", MA->getAccessInstruction()); - if (!onlySameValueWrites(Stmt)) { - R << "store after store of same element in same statement"; - R << " (previous stores: " << Stores; - R << ", storing: " << AccRel << ")"; - S->getFunction().getContext().diagnose(R); - return false; - } + R << "store after store of same element in same statement"; + R << " (previous stores: " << Stores; + R << ", storing: " << AccRel << ")"; + S->getFunction().getContext().diagnose(R); + return false; } Stores = give(isl_union_map_union(Stores.take(), AccRel.take()));