diff options
author | Keno Fischer <keno@alumni.harvard.edu> | 2019-05-08 10:36:04 +0000 |
---|---|---|
committer | Keno Fischer <keno@alumni.harvard.edu> | 2019-05-08 10:36:04 +0000 |
commit | aa1b6f1cfb35576bf5468e3d5d558ac7ee34dc88 (patch) | |
tree | 4fbc23308fb641be8d930c9600679f4ee4250a7a /polly/lib/Support/SCEVAffinator.cpp | |
parent | 69b8b17945f0892e68f3e0ca46d00b2c50966114 (diff) | |
download | bcm5719-llvm-aa1b6f1cfb35576bf5468e3d5d558ac7ee34dc88.tar.gz bcm5719-llvm-aa1b6f1cfb35576bf5468e3d5d558ac7ee34dc88.zip |
[polly][SCEV] Expand SCEV matcher cases for new smin/umin ops
These were added in rL360159, but I neglected to update polly at the
same time.
llvm-svn: 360238
Diffstat (limited to 'polly/lib/Support/SCEVAffinator.cpp')
-rw-r--r-- | polly/lib/Support/SCEVAffinator.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/polly/lib/Support/SCEVAffinator.cpp b/polly/lib/Support/SCEVAffinator.cpp index 85e39e3d5b9..fc6e29ce519 100644 --- a/polly/lib/Support/SCEVAffinator.cpp +++ b/polly/lib/Support/SCEVAffinator.cpp @@ -435,10 +435,26 @@ PWACtx SCEVAffinator::visitSMaxExpr(const SCEVSMaxExpr *Expr) { return Max; } +PWACtx SCEVAffinator::visitSMinExpr(const SCEVSMinExpr *Expr) { + PWACtx Min = visit(Expr->getOperand(0)); + + for (int i = 1, e = Expr->getNumOperands(); i < e; ++i) { + Min = combine(Min, visit(Expr->getOperand(i)), isl_pw_aff_min); + if (isTooComplex(Min)) + return complexityBailout(); + } + + return Min; +} + PWACtx SCEVAffinator::visitUMaxExpr(const SCEVUMaxExpr *Expr) { llvm_unreachable("SCEVUMaxExpr not yet supported"); } +PWACtx SCEVAffinator::visitUMinExpr(const SCEVUMinExpr *Expr) { + llvm_unreachable("SCEVUMinExpr not yet supported"); +} + PWACtx SCEVAffinator::visitUDivExpr(const SCEVUDivExpr *Expr) { // The handling of unsigned division is basically the same as for signed // division, except the interpretation of the operands. As the divisor |