[cfe-commits] r69311 - /cfe/tags/Apple/clang-10/clang/lib/Analysis/ScalarEvolutionExpander.cpp
Mike Stump
mrs at apple.com
Thu Apr 16 14:39:29 PDT 2009
Author: mrs
Date: Thu Apr 16 16:39:29 2009
New Revision: 69311
URL: http://llvm.org/viewvc/llvm-project?rev=69311&view=rev
Log:
Pull in fix for Radar 6799122.
Modified:
cfe/tags/Apple/clang-10/clang/lib/Analysis/ScalarEvolutionExpander.cpp
Modified: cfe/tags/Apple/clang-10/clang/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/tags/Apple/clang-10/clang/lib/Analysis/ScalarEvolutionExpander.cpp?rev=69311&r1=69310&r2=69311&view=diff
==============================================================================
--- cfe/tags/Apple/clang-10/clang/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ cfe/tags/Apple/clang-10/clang/lib/Analysis/ScalarEvolutionExpander.cpp Thu Apr 16 16:39:29 2009
@@ -227,6 +227,8 @@
// 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))
More information about the cfe-commits
mailing list