[PATCH] D78146: [MLIR] Bug fix for simplifyAffineMap
Jeremy Bruestle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 13:31:04 PDT 2020
jbruestle created this revision.
jbruestle added reviewers: bondhugula, rriddle, nicolasvasilache.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, mehdi_amini.
Herald added 1 blocking reviewer(s): rriddle.
Herald added a project: LLVM.
flaub accepted this revision.
flaub added a comment.
LGTM
When simplifying a 0-dimensional affine map (i.e. when map.getNumResults() == 0), AffineMap::get needs to have access to a valid context.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78146
Files:
mlir/lib/IR/AffineMap.cpp
Index: mlir/lib/IR/AffineMap.cpp
===================================================================
--- mlir/lib/IR/AffineMap.cpp
+++ mlir/lib/IR/AffineMap.cpp
@@ -322,7 +322,7 @@
exprs.push_back(
simplifyAffineExpr(e, map.getNumDims(), map.getNumSymbols()));
}
- return AffineMap::get(map.getNumDims(), map.getNumSymbols(), exprs, map.getContext());
+ return AffineMap::get(map.getNumDims(), map.getNumSymbols(), exprs);
}
AffineMap mlir::removeDuplicateExprs(AffineMap map) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78146.257458.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200414/34390ef6/attachment.bin>
More information about the llvm-commits
mailing list