[Mlir-commits] [mlir] [mlir][vector] Refine vector.transfer_read hoisting/forwarding (PR #65770)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Sep 11 02:29:47 PDT 2023
================
@@ -215,4 +215,41 @@ func.func @forward_dead_store_negative(%arg0: i1, %arg1 : memref<4x4xf32>,
vector.transfer_write %v2, %arg1[%c1, %c0] {in_bounds = [true, true]} :
vector<1x4xf32>, memref<4x4xf32>
return %0 : vector<1x4xf32>
-}
\ No newline at end of file
+}
+
+
+// Regression test - the following _potential forwarding_ of %1 to the final
+// `vector.transfer_write` would not be safe:
+// %1 = vector.transfer_read %subview
+// vector.transfer_write %1, %alloca
+// vector.transfer_write %vec, %collapse_shape
+// vector.transfer_write %1, %subview
+// Indeed, %alloca and %collapse_shape alias and hence %2 != %1.
----------------
banach-space wrote:
Thanks, clarified in the latest fixup.
https://github.com/llvm/llvm-project/pull/65770
More information about the Mlir-commits
mailing list