Disable support for pointer expressions
The support for pointer expressions is broken as it can only handle
some patterns in the IslExprBuilder. We should to treat pointers in
expressions the same as integers at some point and revert this patch.
llvm-svn: 247147
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp
index 2092047..85bda18 100644
--- a/polly/lib/Support/SCEVValidator.cpp
+++ b/polly/lib/Support/SCEVValidator.cpp
@@ -366,8 +366,16 @@
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);
}