[Mlir-commits] [mlir] [MLIR][Affine] Fix dead store elimination for vector stores with different types (PR #189248)
Hocky Yudhiono
llvmlistbot at llvm.org
Mon Mar 30 03:41:13 PDT 2026
================
@@ -936,6 +937,13 @@ static void findUnusedStore(AffineWriteOpInterface writeA,
if (srcAccess != destAccess)
continue;
+ // Check that the store types match. If types differ, writeB may not cover
+ // all bytes written by writeA (e.g. a narrower vector type), so
+ // conservatively assume writeA is not dead.
+ if (writeA.getValueToStore().getType() !=
----------------
hockyy wrote:
less conservative solution is to check whether the bits written in writeA is smaller than writeB. But this one is ok
https://github.com/llvm/llvm-project/pull/189248
More information about the Mlir-commits
mailing list