[Mlir-commits] [mlir] [MLIR] [Vector] Added canonicalizer for folding from_elements + transpose (PR #161841)

Diego Caballero llvmlistbot at llvm.org
Fri Oct 17 15:29:12 PDT 2025


================
@@ -6723,6 +6723,61 @@ class FoldTransposeShapeCast final : public OpRewritePattern<TransposeOp> {
   }
 };
 
+/// Folds transpose(from_elements(...)) into a new from_elements with permuted
+/// operands matching the transposed shape.
----------------
dcaballe wrote:

Could you add a before and after IR example? That usually helps a lot with understanding.

https://github.com/llvm/llvm-project/pull/161841


More information about the Mlir-commits mailing list