[llvm] r243065 - [NaryReassociate] remove redundant code
Jingyue Wu
jingyue at google.com
Thu Jul 23 16:13:37 PDT 2015
Author: jingyue
Date: Thu Jul 23 18:13:37 2015
New Revision: 243065
URL: http://llvm.org/viewvc/llvm-project?rev=243065&view=rev
Log:
[NaryReassociate] remove redundant code
This check is already done by findClosestMatchingDominator.
Modified:
llvm/trunk/lib/Transforms/Scalar/NaryReassociate.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/NaryReassociate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NaryReassociate.cpp?rev=243065&r1=243064&r2=243065&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NaryReassociate.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NaryReassociate.cpp Thu Jul 23 18:13:37 2015
@@ -508,11 +508,6 @@ Instruction *NaryReassociate::tryReassoc
Instruction *NaryReassociate::tryReassociatedAdd(const SCEV *LHSExpr,
Value *RHS, Instruction *I) {
- auto Pos = SeenExprs.find(LHSExpr);
- // Bail out if LHSExpr is not previously seen.
- if (Pos == SeenExprs.end())
- return nullptr;
-
// Look for the closest dominator LHS of I that computes LHSExpr, and replace
// I with LHS + RHS.
auto *LHS = findClosestMatchingDominator(LHSExpr, I);
More information about the llvm-commits
mailing list