summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support/SCEVValidator.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-05-12 15:13:49 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-05-12 15:13:49 +0000
commit6f1bb7a9d90fb136777ad6342ddf976f006bfc5b (patch)
treeb2275db15a5908325981bfc69763097fe343ce85 /polly/lib/Support/SCEVValidator.cpp
parent404a0f81ea47c743d75944b504bcc0a4dc81d5df (diff)
downloadbcm5719-llvm-6f1bb7a9d90fb136777ad6342ddf976f006bfc5b.tar.gz
bcm5719-llvm-6f1bb7a9d90fb136777ad6342ddf976f006bfc5b.zip
Support truncate operations
Truncate operations are basically modulo operations, thus we can model them that way. However, for large types we assume the operand to fit in the new type size instead of introducing a modulo with a very large constant. llvm-svn: 269300
Diffstat (limited to 'polly/lib/Support/SCEVValidator.cpp')
-rw-r--r--polly/lib/Support/SCEVValidator.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp
index 838bfe9827f..844324434ce 100644
--- a/polly/lib/Support/SCEVValidator.cpp
+++ b/polly/lib/Support/SCEVValidator.cpp
@@ -136,23 +136,7 @@ public:
}
class ValidatorResult visitTruncateExpr(const SCEVTruncateExpr *Expr) {
- ValidatorResult Op = visit(Expr->getOperand());
-
- switch (Op.getType()) {
- case SCEVType::INT:
- case SCEVType::PARAM:
- // We currently do not represent a truncate expression as an affine
- // expression. If it is constant during Scop execution, we treat it as a
- // parameter.
- return ValidatorResult(SCEVType::PARAM, Expr);
- case SCEVType::IV:
- DEBUG(dbgs() << "INVALID: Truncation of SCEVType::IV expression");
- return ValidatorResult(SCEVType::INVALID);
- case SCEVType::INVALID:
- return Op;
- }
-
- llvm_unreachable("Unknown SCEVType");
+ return visit(Expr->getOperand());
}
class ValidatorResult visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) {
OpenPOWER on IntegriCloud