projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e4042d
)
Handle a pointer type correctly in SCEVExpander::visitAddRecExpr.
author
Dan Gohman
<gohman@apple.com>
Thu, 16 Apr 2009 21:34:54 +0000
(21:34 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 16 Apr 2009 21:34:54 +0000
(21:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69310
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/ScalarEvolutionExpander.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/ScalarEvolutionExpander.cpp
b/lib/Analysis/ScalarEvolutionExpander.cpp
index 0e0eb55a0586933238dfd69eae06e9796fc24cf8..c27bbdc9b1c81748550081a975c82755758ba135 100644
(file)
--- a/
lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/
lib/Analysis/ScalarEvolutionExpander.cpp
@@
-227,6
+227,8
@@
Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
// If this is a simple linear addrec, emit it now as a special case.
if (S->isAffine()) { // {0,+,F} --> i*F
Value *F = expand(S->getOperand(1));
+ if (isa<PointerType>(F->getType()))
+ F = InsertCastOfTo(Instruction::PtrToInt, F, TD.getIntPtrType());
// IF the step is by one, just return the inserted IV.
if (ConstantInt *CI = dyn_cast<ConstantInt>(F))