BlockGenerator: Assert that we do not get alloca of array access
authorTobias Grosser <tobias@grosser.es>
Thu, 4 Aug 2016 06:55:53 +0000 (06:55 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 4 Aug 2016 06:55:53 +0000 (06:55 +0000)
llvm-svn: 277698

polly/lib/CodeGen/BlockGenerators.cpp

index 436aea1..7c398eb 100644 (file)
@@ -363,6 +363,8 @@ Value *BlockGenerator::getOrCreateAlloca(Value *ScalarBase,
 }
 
 Value *BlockGenerator::getOrCreateAlloca(const MemoryAccess &Access) {
+  assert(!Access.isArrayKind() && "Trying to get alloca for array kind");
+
   if (Access.isPHIKind())
     return getOrCreatePHIAlloca(Access.getBaseAddr());
   else
@@ -370,6 +372,8 @@ Value *BlockGenerator::getOrCreateAlloca(const MemoryAccess &Access) {
 }
 
 Value *BlockGenerator::getOrCreateAlloca(const ScopArrayInfo *Array) {
+  assert(!Array->isArrayKind() && "Trying to get alloca for array kind");
+
   if (Array->isPHIKind())
     return getOrCreatePHIAlloca(Array->getBasePtr());
   else