From cab4b8c41b3ad08b3d2b845fa188109a469e40f5 Mon Sep 17 00:00:00 2001 From: Jingyue Wu Date: Thu, 23 Jul 2015 23:13:37 +0000 Subject: [PATCH] [NaryReassociate] remove redundant code This check is already done by findClosestMatchingDominator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243065 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/NaryReassociate.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/Transforms/Scalar/NaryReassociate.cpp b/lib/Transforms/Scalar/NaryReassociate.cpp index f42f8306fcc..58b9c9d092d 100644 --- a/lib/Transforms/Scalar/NaryReassociate.cpp +++ b/lib/Transforms/Scalar/NaryReassociate.cpp @@ -508,11 +508,6 @@ Instruction *NaryReassociate::tryReassociateAdd(Value *LHS, Value *RHS, 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); -- 2.34.1