summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2016-09-30 18:29:37 +0000
committerMichael Kruse <llvm@meinersbur.de>2016-09-30 18:29:37 +0000
commit4b0c5aea7856eacf0e309360a3e72cf96cf602e9 (patch)
tree321f3ef65a7c9175f397a40498ff4c826c7179c7
parentcfa31b6307d2d2ecb0a9c9c3b81c0305531ffadd (diff)
downloadbcm5719-llvm-4b0c5aea7856eacf0e309360a3e72cf96cf602e9.tar.gz
bcm5719-llvm-4b0c5aea7856eacf0e309360a3e72cf96cf602e9.zip
[CodeGen] Add assertion for indirect array index expression generation. NFC.
Currently Polly cannot generate code for index expressions if the base pointer is computed within the scop. The base pointer must be generated as well, but there is no code that triggers that. Add an assertion to detect when this would occur and miscompile. The IR verifier should catch it as well. llvm-svn: 282893
-rw-r--r--polly/lib/CodeGen/IslNodeBuilder.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp
index cea97b78f00..4f2494a8269 100644
--- a/polly/lib/CodeGen/IslNodeBuilder.cpp
+++ b/polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -720,6 +720,9 @@ IslNodeBuilder::createNewAccesses(ScopStmt *Stmt,
if (!MA->hasNewAccessRelation())
continue;
+ assert(!MA->getLatestScopArrayInfo()->getBasePtrOriginSAI() &&
+ "Generating new index expressions to indirect arrays not working");
+
auto Schedule = isl_ast_build_get_schedule(Build);
auto PWAccRel = MA->applyScheduleToAccessRelation(Schedule);
OpenPOWER on IntegriCloud