[polly] r190429 - Fix build after SCEV change

Matt Arsenault Matthew.Arsenault at amd.com
Tue Sep 10 13:22:17 PDT 2013


Author: arsenm
Date: Tue Sep 10 15:22:17 2013
New Revision: 190429

URL: http://llvm.org/viewvc/llvm-project?rev=190429&view=rev
Log:
Fix build after SCEV change

Modified:
    polly/trunk/lib/IndVarSimplify.cpp

Modified: polly/trunk/lib/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/IndVarSimplify.cpp?rev=190429&r1=190428&r2=190429&view=diff
==============================================================================
--- polly/trunk/lib/IndVarSimplify.cpp (original)
+++ polly/trunk/lib/IndVarSimplify.cpp Tue Sep 10 15:22:17 2013
@@ -1557,9 +1557,11 @@ static Value *genLoopLimit(PHINode *IndV
     assert(AR->getStart() == SE->getSCEV(GEPBase) && "bad loop counter");
     // We could handle pointer IVs other than i8*, but we need to compensate for
     // gep index scaling. See canExpandBackedgeTakenCount comments.
-    assert(SE->getSizeOfExpr(cast<PointerType>(GEPBase->getType())
-                                 ->getElementType())->isOne() &&
-           "unit stride pointer IV must be i8*");
+    assert(
+      SE->getSizeOfExpr(
+        IntegerType::getInt64Ty(IndVar->getContext()),
+        cast<PointerType>(GEPBase->getType())->getElementType())->isOne() &&
+      "unit stride pointer IV must be i8*");
 
     IRBuilder<> Builder(L->getLoopPreheader()->getTerminator());
     return Builder.CreateGEP(GEPBase, GEPOffset, "lftr.limit");





More information about the llvm-commits mailing list