[Mlir-commits] [mlir] [mlir][Affine] Fix loadCSE replacing a load with one already scheduled for erasure (PR #217511)
Federico Bruzzone
llvmlistbot at llvm.org
Sat Sep 5 01:38:36 PDT 2026
================
@@ -1000,6 +1000,12 @@ static void loadCSE(AffineReadOpInterface loadA,
if (loadB.getValue().getType() != loadA.getValue().getType())
continue;
+ // loadB should not already be scheduled for erasure. Otherwise, loadA
+ // would end up being replaced with (and then erased along with) an
+ // operation that no longer exists.
----------------
FedericoBruzzone wrote:
```suggestion
// loadB should not already be scheduled for erasure. Otherwise, loadA
// would end up being replaced with an operation that no longer exists.
```
https://github.com/llvm/llvm-project/pull/217511
More information about the Mlir-commits
mailing list