[Mlir-commits] [mlir] [MLIR][Affine] Fix dead store elimination for vector stores with different types (PR #189248)

Mehdi Amini llvmlistbot at llvm.org
Wed Apr 1 03:27:12 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() !=
----------------
joker-eph wrote:

I will make such a note in the comment here.

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


More information about the Mlir-commits mailing list