[Mlir-commits] [llvm] [mlir] [MLIR] Generalize expand_shape to take shape as explicit input (PR #69267)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Apr 17 16:36:54 PDT 2024
================
@@ -586,9 +586,18 @@ struct FoldFillWithTensorReshape : OpRewritePattern<TensorReshapeOp> {
return failure();
Location loc = oldFill.getLoc();
- auto newInit = rewriter.create<TensorReshapeOp>(
- loc, reshapeOp.getResultType(), oldFill.output(),
- reshapeOp.getReassociation());
+ TensorReshapeOp newInit;
+ if constexpr (std::is_same<TensorReshapeOp, tensor::ExpandShapeOp>::value) {
+
----------------
MaheshRavishankar wrote:
nit: unnecessary empty line
https://github.com/llvm/llvm-project/pull/69267
More information about the Mlir-commits
mailing list