[Mlir-commits] [mlir] [MLIR][XeGPU] Clean up stale convert_layout on single-element vector in peephole (PR #194043)
Nishant Patel
llvmlistbot at llvm.org
Mon Apr 27 14:05:39 PDT 2026
================
@@ -449,11 +449,14 @@ class MultiRed2dOpPattern
auto loc = reductionOp.getLoc();
auto acc = reductionOp.getAcc();
- // If the result is scalar after reduction, look for consumer
- // convert_layout op and remove it. The layout propagation pass will
- // re-install it properly after the decomposition.
+ // If the result is scalar or a single-element vector after reduction,
+ // look for consumer convert_layout op and remove it. The layout
----------------
nbpatel wrote:
why is it not safe to remove it? the peephole-optimization happens after blocking so we shouldn't have any meaningful convert layout op at this level except for the ones with compatible layouts
https://github.com/llvm/llvm-project/pull/194043
More information about the Mlir-commits
mailing list