[PATCH] D72808: [mlir] [VectorOps] Lowering of vector.extract/insert_slices to LLVM IR

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 16:40:02 PST 2020


rriddle added inline comments.


================
Comment at: mlir/lib/Dialect/VectorOps/VectorOps.cpp:1699
+    if (auto tupleOp =
+            dyn_cast_or_null<TupleOp>(op.getOperand().getDefiningOp())) {
+      rewriter.replaceOp(op, tupleOp.getOperand(op.getIndex()));
----------------
rriddle wrote:
> rriddle wrote:
> > This should just be in the 'fold' method instead of a canonicalization pattern.
> 'fold' should be used whenever possible because it is applicable in many more places, e.g. during dialect conversion and OpBuilder::createOrFold.
Also, please split this out into a different revision as this is unrelated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72808/new/

https://reviews.llvm.org/D72808





More information about the llvm-commits mailing list