[Mlir-commits] [mlir] [mlir][vector] Add linearization patterns for vector.load & vector.store (PR #137558)
Nishant Patel
llvmlistbot at llvm.org
Wed Apr 30 08:41:04 PDT 2025
================
@@ -399,3 +399,113 @@ func.func @test_vector_bitcast(%arg0: vector<[4]x2xf32>) -> vector<[4]x4xf16> {
%1 = vector.bitcast %arg0 : vector<[4]x2xf32> to vector<[4]x4xf16>
return %1 : vector<[4]x4xf16>
}
+
+// -----
+// ALL-LABEL: linearize_vector_load
+// ALL-SAME: (%[[ARG_0:.*]]: memref<4x4xf16>)
+func.func @linearize_2D_vector_load(%arg0: memref<4x4xf16>) -> vector<4x4xf16> {
----------------
nbpatel wrote:
Not in the test case I added but lets say if I used f32 (4 x 32) instead, then it would be different and it would not trigger the linearization since isLessThanTargetBitWidth would return false
https://github.com/llvm/llvm-project/pull/137558
More information about the Mlir-commits
mailing list