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 | a029cbe93f6a69d5e462d5da25e72bec90f2350f (patch) | |
| tree | 367676010b46eef82a85de0d33b787ab18659e14 | |
| parent | fe29117f6c7af685db974a698cdf20b741cb8a59 (diff) | |
| download | bcm5719-llvm-a029cbe93f6a69d5e462d5da25e72bec90f2350f.tar.gz bcm5719-llvm-a029cbe93f6a69d5e462d5da25e72bec90f2350f.zip | |
Make ScalarEvolution::getConstant support pointer types, for consistency
with ScalarEvolution's overall approach to pointer types.
llvm-svn: 102003
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 14e6bcb1815..d528be095f9 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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(); } |

