summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/NewGVN.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index 285d8e65aea..6abca9177ea 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -771,11 +771,11 @@ const Expression *NewGVN::performSymbolicCallEvaluation(Instruction *I,
CallInst *CI = cast<CallInst>(I);
if (AA->doesNotAccessMemory(CI))
return createCallExpression(CI, nullptr, B);
- else if (AA->onlyReadsMemory(CI)) {
+ if (AA->onlyReadsMemory(CI)) {
MemoryAccess *DefiningAccess = MSSAWalker->getClobberingMemoryAccess(CI);
return createCallExpression(CI, lookupMemoryAccessEquiv(DefiningAccess), B);
- } else
- return nullptr;
+ }
+ return nullptr;
}
// Update the memory access equivalence table to say that From is equal to To,
OpenPOWER on IntegriCloud