[polly] r244401 - Add an assertion

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 8 11:10:54 PDT 2015


Author: meinersbur
Date: Sat Aug  8 13:10:54 2015
New Revision: 244401

URL: http://llvm.org/viewvc/llvm-project?rev=244401&view=rev
Log:
Add an assertion

Check whether a block is a direct predecessor.


Modified:
    polly/trunk/lib/CodeGen/BlockGenerators.cpp

Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=244401&r1=244400&r2=244401&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Sat Aug  8 13:10:54 2015
@@ -514,6 +514,7 @@ void BlockGenerator::generateScalarStore
     if (MA->getScopArrayInfo()->isPHI()) {
       PHINode *BasePHI = dyn_cast<PHINode>(Base);
       int PHIIdx = BasePHI->getBasicBlockIndex(BB);
+      assert(PHIIdx >= 0);
       Address = getOrCreateAlloca(Base, PHIOpMap, ".phiops");
       Val = BasePHI->getIncomingValue(PHIIdx);
     } else {




More information about the llvm-commits mailing list