summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/lib/Analysis/TempScopInfo.cpp3
-rw-r--r--polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll6
2 files changed, 8 insertions, 1 deletions
diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp
index c669f5544f8..bb242df9a71 100644
--- a/polly/lib/Analysis/TempScopInfo.cpp
+++ b/polly/lib/Analysis/TempScopInfo.cpp
@@ -210,6 +210,9 @@ bool TempScopInfo::buildScalarDependences(Instruction *Inst, Region *R,
if (R->contains(OpInst))
continue;
+ if (isa<Constant>(Op))
+ continue;
+
IRAccess ScalarAccess(IRAccess::READ, Op, ZeroOffset, 1, true, Op);
AccFuncMap[Inst->getParent()].push_back(
std::make_pair(ScalarAccess, Inst));
diff --git a/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll b/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll
index 5f03f55f9cb..a22b1718248 100644
--- a/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll
+++ b/polly/test/Isl/CodeGen/phi_loop_carried_float_escape.ll
@@ -1,4 +1,8 @@
-; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable -polly-codegen < %s | FileCheck %s
+; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable \
+; RUN: -polly-analyze-read-only-scalars=false -polly-codegen < %s | FileCheck %s
+
+; RUN: opt %loadPolly -S -polly-no-early-exit -polly-detect-unprofitable \
+; RUN: -polly-analyze-read-only-scalars=true -polly-codegen < %s | FileCheck %s
;
; float f(float *A, int N) {
; float tmp = 0;
OpenPOWER on IntegriCloud