aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/ScalarEvolutionExpressions.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-01 04:48:52 +0000
committerChris Lattner <sabre@nondot.org>2006-04-01 04:48:52 +0000
commit60a05cc118763c680834a61280f48530482a1f86 (patch)
tree0bf657b3b9be34f509eff95d5e219ef78c566b68 /include/llvm/Analysis/ScalarEvolutionExpressions.h
parentb076783e7d14ab592c4ef2fcb08fea402e2d6986 (diff)
downloadexternal_llvm-60a05cc118763c680834a61280f48530482a1f86.tar.gz
external_llvm-60a05cc118763c680834a61280f48530482a1f86.tar.bz2
external_llvm-60a05cc118763c680834a61280f48530482a1f86.zip
Fix Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll and
PR726 by performing consistent signed division, not consistent unsigned division when evaluating scev's. Do not touch udivs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpressions.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpressions.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h
index 43244c028a..2a546c3482 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -23,7 +23,7 @@ namespace llvm {
enum SCEVTypes {
// These should be ordered in terms of increasing complexity to make the
// folders simpler.
- scConstant, scTruncate, scZeroExtend, scAddExpr, scMulExpr, scUDivExpr,
+ scConstant, scTruncate, scZeroExtend, scAddExpr, scMulExpr, scSDivExpr,
scAddRecExpr, scUnknown, scCouldNotCompute
};
@@ -293,16 +293,16 @@ namespace llvm {
//===--------------------------------------------------------------------===//
- /// SCEVUDivExpr - This class represents a binary unsigned division operation.
+ /// SCEVSDivExpr - This class represents a binary unsigned division operation.
///
- class SCEVUDivExpr : public SCEV {
+ class SCEVSDivExpr : public SCEV {
SCEVHandle LHS, RHS;
- SCEVUDivExpr(const SCEVHandle &lhs, const SCEVHandle &rhs)
- : SCEV(scUDivExpr), LHS(lhs), RHS(rhs) {}
+ SCEVSDivExpr(const SCEVHandle &lhs, const SCEVHandle &rhs)
+ : SCEV(scSDivExpr), LHS(lhs), RHS(rhs) {}
- virtual ~SCEVUDivExpr();
+ virtual ~SCEVSDivExpr();
public:
- /// get method - This just gets and returns a new SCEVUDiv object.
+ /// get method - This just gets and returns a new SCEVSDiv object.
///
static SCEVHandle get(const SCEVHandle &LHS, const SCEVHandle &RHS);
@@ -334,9 +334,9 @@ namespace llvm {
void print(std::ostream &OS) const;
/// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const SCEVUDivExpr *S) { return true; }
+ static inline bool classof(const SCEVSDivExpr *S) { return true; }
static inline bool classof(const SCEV *S) {
- return S->getSCEVType() == scUDivExpr;
+ return S->getSCEVType() == scSDivExpr;
}
};
@@ -496,8 +496,8 @@ namespace llvm {
return ((SC*)this)->visitAddExpr((SCEVAddExpr*)S);
case scMulExpr:
return ((SC*)this)->visitMulExpr((SCEVMulExpr*)S);
- case scUDivExpr:
- return ((SC*)this)->visitUDivExpr((SCEVUDivExpr*)S);
+ case scSDivExpr:
+ return ((SC*)this)->visitSDivExpr((SCEVSDivExpr*)S);
case scAddRecExpr:
return ((SC*)this)->visitAddRecExpr((SCEVAddRecExpr*)S);
case scUnknown: