Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,

PR3296 and PR3302.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky
2009-01-13 09:18:58 +00:00
parent 3ff704fa2b
commit 789558db70
12 changed files with 50 additions and 266 deletions
-9
View File
@@ -143,15 +143,6 @@ Value *SCEVExpander::visitUDivExpr(SCEVUDivExpr *S) {
return InsertBinop(Instruction::UDiv, LHS, RHS, InsertPt);
}
Value *SCEVExpander::visitSDivExpr(SCEVSDivExpr *S) {
// Do not fold sdiv into ashr, unless you know that LHS is positive. On
// negative values, it rounds the wrong way.
Value *LHS = expand(S->getLHS());
Value *RHS = expand(S->getRHS());
return InsertBinop(Instruction::SDiv, LHS, RHS, InsertPt);
}
Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
const Type *Ty = S->getType();
const Loop *L = S->getLoop();