summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp6
-rw-r--r--polly/lib/Support/SCEVValidator.cpp12
-rw-r--r--polly/test/Isl/CodeGen/20120316-InvalidCast.ll5
-rw-r--r--polly/test/Isl/CodeGen/pointer-type-expressions-2.ll5
-rw-r--r--polly/test/Isl/CodeGen/pointer-type-expressions.ll5
-rw-r--r--polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll5
-rw-r--r--polly/test/ScopInfo/pointer-type-expressions.ll5
7 files changed, 41 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 06f1bfc68af..34e19648a0b 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -344,6 +344,12 @@ bool ScopDetection::isValidCFG(BasicBlock &BB,
isa<UndefValue>(ICmp->getOperand(1)))
return invalid<ReportUndefOperand>(Context, /*Assert=*/true, &BB, ICmp);
+ // TODO: FIXME: IslExprBuilder is not capable of producing valid code
+ // for arbitrary pointer expressions at the moment. Until
+ // this is fixed we disallow pointer expressions completely.
+ if (ICmp->getOperand(0)->getType()->isPointerTy())
+ return false;
+
Loop *L = LI->getLoopFor(ICmp->getParent());
const SCEV *LHS = SE->getSCEVAtScope(ICmp->getOperand(0), L);
const SCEV *RHS = SE->getSCEVAtScope(ICmp->getOperand(1), L);
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp
index 2092047e92e..85bda185ec3 100644
--- a/polly/lib/Support/SCEVValidator.cpp
+++ b/polly/lib/Support/SCEVValidator.cpp
@@ -366,8 +366,16 @@ public:
ValidatorResult visitUnknown(const SCEVUnknown *Expr) {
Value *V = Expr->getValue();
- if (!(Expr->getType()->isIntegerTy() || Expr->getType()->isPointerTy())) {
- DEBUG(dbgs() << "INVALID: UnknownExpr is not an integer or pointer type");
+ // TODO: FIXME: IslExprBuilder is not capable of producing valid code
+ // for arbitrary pointer expressions at the moment. Until
+ // this is fixed we disallow pointer expressions completely.
+ if (Expr->getType()->isPointerTy()) {
+ DEBUG(dbgs() << "INVALID: UnknownExpr is a pointer type [FIXME]");
+ return ValidatorResult(SCEVType::INVALID);
+ }
+
+ if (!Expr->getType()->isIntegerTy()) {
+ DEBUG(dbgs() << "INVALID: UnknownExpr is not an integer");
return ValidatorResult(SCEVType::INVALID);
}
diff --git a/polly/test/Isl/CodeGen/20120316-InvalidCast.ll b/polly/test/Isl/CodeGen/20120316-InvalidCast.ll
index 8ef27fd7b63..71c4a16435d 100644
--- a/polly/test/Isl/CodeGen/20120316-InvalidCast.ll
+++ b/polly/test/Isl/CodeGen/20120316-InvalidCast.ll
@@ -1,5 +1,10 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -S -polly-codegen -polly-no-early-exit < %s | FileCheck %s
+; TODO: FIXME: IslExprBuilder is not capable of producing valid code
+; for arbitrary pointer expressions at the moment. Until
+; this is fixed we disallow pointer expressions completely.
+; XFAIL: *
+
; CHECK: polly.start
target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-a0:0-n32"
diff --git a/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll b/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll
index 68b23fed503..7c273477a23 100644
--- a/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll
+++ b/polly/test/Isl/CodeGen/pointer-type-expressions-2.ll
@@ -2,6 +2,11 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+; TODO: FIXME: IslExprBuilder is not capable of producing valid code
+; for arbitrary pointer expressions at the moment. Until
+; this is fixed we disallow pointer expressions completely.
+; XFAIL: *
+
define void @foo(i8* %start, i8* %end) {
entry:
%A = alloca i32
diff --git a/polly/test/Isl/CodeGen/pointer-type-expressions.ll b/polly/test/Isl/CodeGen/pointer-type-expressions.ll
index e3c24a76332..d3f85d9589e 100644
--- a/polly/test/Isl/CodeGen/pointer-type-expressions.ll
+++ b/polly/test/Isl/CodeGen/pointer-type-expressions.ll
@@ -1,6 +1,11 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-ast -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
+; TODO: FIXME: IslExprBuilder is not capable of producing valid code
+; for arbitrary pointer expressions at the moment. Until
+; this is fixed we disallow pointer expressions completely.
+; XFAIL: *
+
; void f(int a[], int N, float *P) {
; int i;
; for (i = 0; i < N; ++i)
diff --git a/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll b/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll
index 61f46062ef5..91d91352f69 100644
--- a/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll
+++ b/polly/test/Isl/CodeGen/pointer-type-pointer-type-comparison.ll
@@ -1,6 +1,11 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-ast -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-codegen -S < %s | FileCheck %s -check-prefix=CODEGEN
;
+; TODO: FIXME: IslExprBuilder is not capable of producing valid code
+; for arbitrary pointer expressions at the moment. Until
+; this is fixed we disallow pointer expressions completely.
+; XFAIL: *
+
; void f(int a[], int N, float *P, float *Q) {
; int i;
; for (i = 0; i < N; ++i)
diff --git a/polly/test/ScopInfo/pointer-type-expressions.ll b/polly/test/ScopInfo/pointer-type-expressions.ll
index cf25e4d6697..44c7de37fda 100644
--- a/polly/test/ScopInfo/pointer-type-expressions.ll
+++ b/polly/test/ScopInfo/pointer-type-expressions.ll
@@ -1,5 +1,10 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -analyze < %s | FileCheck %s
+; TODO: FIXME: IslExprBuilder is not capable of producing valid code
+; for arbitrary pointer expressions at the moment. Until
+; this is fixed we disallow pointer expressions completely.
+; XFAIL: *
+
; void f(int a[], int N, float *P) {
; int i;
; for (i = 0; i < N; ++i)
OpenPOWER on IntegriCloud