Remove identity operation from SCEVAffinator
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>
Wed, 12 Aug 2015 10:58:01 +0000 (10:58 +0000)
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>
Wed, 12 Aug 2015 10:58:01 +0000 (10:58 +0000)
llvm-svn: 244736

polly/lib/Support/SCEVAffinator.cpp

index 1ac01e0..06d7672 100644 (file)
@@ -152,7 +152,6 @@ SCEVAffinator::visitAddRecExpr(const SCEVAddRecExpr *Expr) {
     assert(S->getRegion().contains(Expr->getLoop()) &&
            "Scop does not contain the loop referenced in this AddRec");
 
-    isl_pw_aff *Start = visit(Expr->getStart());
     isl_pw_aff *Step = visit(Expr->getOperand(1));
     isl_space *Space = isl_space_set_alloc(Ctx, 0, NumIterators);
     isl_local_space *LocalSpace = isl_local_space_from_space(Space);
@@ -164,7 +163,7 @@ SCEVAffinator::visitAddRecExpr(const SCEVAddRecExpr *Expr) {
     isl_pw_aff *LPwAff = isl_pw_aff_from_aff(LAff);
 
     // TODO: Do we need to check for NSW and NUW?
-    return isl_pw_aff_add(Start, isl_pw_aff_mul(Step, LPwAff));
+    return isl_pw_aff_mul(Step, LPwAff);
   }
 
   // Translate AddRecExpr from '{start, +, inc}' into 'start + {0, +, inc}'