diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-21 16:04:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-21 16:04:04 +0000 |
commit | a560fd28c01367ffd7b64bbeace856b50af1753c (patch) | |
tree | d1b5f3dc16466a50babdca6b582c4ecea4e27bec /lib/Analysis/ScalarEvolution.cpp | |
parent | cb9dda69468ee14ac02ecb256315f8699cf03d65 (diff) |
Make ScalarEvolution::getConstant support pointer types, for consistency
with ScalarEvolution's overall approach to pointer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 14e6bcb181..d528be095f 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -188,8 +188,8 @@ const SCEV *ScalarEvolution::getConstant(const APInt& Val) { const SCEV * ScalarEvolution::getConstant(const Type *Ty, uint64_t V, bool isSigned) { - return getConstant( - ConstantInt::get(cast<IntegerType>(Ty), V, isSigned)); + const IntegerType *ITy = cast<IntegerType>(getEffectiveSCEVType(Ty)); + return getConstant(ConstantInt::get(ITy, V, isSigned)); } const Type *SCEVConstant::getType() const { return V->getType(); } |