mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
Handle a pointer type correctly in SCEVExpander::visitAddRecExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0e4042d30b
commit
4d177592f2
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user