diff options
author | Ehsan Amiri <amehsan@ca.ibm.com> | 2016-08-11 14:51:14 +0000 |
---|---|---|
committer | Ehsan Amiri <amehsan@ca.ibm.com> | 2016-08-11 14:51:14 +0000 |
commit | 3818f1b38ae7b29dfeed0f11cff1a6b30fcc4f0e (patch) | |
tree | 4e77b0393a4d8b07ef29d398592375c7c18dd2d6 /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | 82c73bee2b7e11dc9105d47ef61957fbea383f80 (diff) | |
download | bcm5719-llvm-3818f1b38ae7b29dfeed0f11cff1a6b30fcc4f0e.tar.gz bcm5719-llvm-3818f1b38ae7b29dfeed0f11cff1a6b30fcc4f0e.zip |
revert 278334
llvm-svn: 278337
Diffstat (limited to 'llvm/lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index ddd5cdc6bcc..056886f80e6 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -1989,34 +1989,7 @@ linearFunctionTestReplace(Loop *L, DEBUG(dbgs() << " Widen RHS:\t" << *ExitCnt << "\n"); } else { - // We try to extend trip count first. If that doesn't work we truncate IV. - // Zext(trunc(IV)) == IV implies equivalence of the following two: - // Trunc(IV) == ExitCnt and IV == zext(ExitCnt). Similarly for sext. If - // one of the two holds, extend the trip count, otherwise truncate IV. - bool Extended = false; - const SCEV *IV = SE->getSCEV(CmpIndVar); - const SCEV *ZExtTrunc = - SE->getZeroExtendExpr(SE->getTruncateExpr(SE->getSCEV(CmpIndVar), - ExitCnt->getType()), - CmpIndVar->getType()); - - if (ZExtTrunc == IV) { - Extended = true; - ExitCnt = Builder.CreateZExt(ExitCnt, IndVar->getType(), - "wide.trip.count"); - } else { - const SCEV *SExtTrunc = - SE->getSignExtendExpr(SE->getTruncateExpr(SE->getSCEV(CmpIndVar), - ExitCnt->getType()), - CmpIndVar->getType()); - if (SExtTrunc == IV) { - Extended = true; - ExitCnt = Builder.CreateSExt(ExitCnt, IndVar->getType(), - "wide.trip.count"); - } - } - if (!Extended) CmpIndVar = Builder.CreateTrunc(CmpIndVar, ExitCnt->getType(), "lftr.wideiv"); } |