[Mlir-commits] [mlir] [mlir][ArmSME] Pattern to swap shape_cast(tranpose) with transpose(shape_cast) (PR #100731)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Jul 26 05:56:15 PDT 2024


================
@@ -774,6 +774,94 @@ struct ConvertIllegalShapeCastOpsToTransposes
   }
 };
 
+/// Returns an iterator over the dims (inc scalability) of a VectorType.
+static auto getDims(VectorType vType) {
+  return llvm::zip_equal(vType.getShape(), vType.getScalableDims());
+}
+
+/// Helper to drop unit dims from a VectorType.
----------------
banach-space wrote:

I know that you don't like "scalable unit", but perhaps just add a note that this is meant to be a fixed-width "unit" so that it's more explicit?

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


More information about the Mlir-commits mailing list