@@ -1264,7 +1264,6 @@ class ArrayUpdateConversion : public ArrayUpdateConversionBase<ArrayUpdateOp> {
12641264 auto lhsEltRefType = toRefType (update.getMerge ().getType ());
12651265 auto [_, lhsLoadResult] = materializeAssignment (
12661266 loc, rewriter, update, assignElement, lhsEltRefType);
1267- update.replaceAllUsesWith (lhsLoadResult);
12681267 rewriter.replaceOp (update, lhsLoadResult);
12691268 return mlir::success ();
12701269 }
@@ -1287,7 +1286,6 @@ class ArrayModifyConversion : public ArrayUpdateConversionBase<ArrayModifyOp> {
12871286 auto lhsEltRefType = modify.getResult (0 ).getType ();
12881287 auto [lhsEltCoor, lhsLoadResult] = materializeAssignment (
12891288 loc, rewriter, modify, assignElement, lhsEltRefType);
1290- modify.replaceAllUsesWith (mlir::ValueRange{lhsEltCoor, lhsLoadResult});
12911289 rewriter.replaceOp (modify, mlir::ValueRange{lhsEltCoor, lhsLoadResult});
12921290 return mlir::success ();
12931291 }
@@ -1339,7 +1337,6 @@ class ArrayAccessConversion : public ArrayUpdateConversionBase<ArrayAccessOp> {
13391337 // This array_access is associated with an array_amend and there is a
13401338 // conflict. Make a copy to store into.
13411339 auto result = referenceToClone (loc, rewriter, access);
1342- access.replaceAllUsesWith (result);
13431340 rewriter.replaceOp (access, result);
13441341 return mlir::success ();
13451342 }
0 commit comments