[Mlir-commits] [mlir] [MLIR][Affine] Preserve discardable attrs when adding loop yields (PR #210571)

Takayuki Todokoro llvmlistbot at llvm.org
Sun Jul 19 05:00:36 PDT 2026


takatodo wrote:

@ftynse ,could you please review this small Affine/LoopLike fix?

`AffineForOp::replaceWithAdditionalYields` rebuilds the loop but currently drops discardable attributes. This patch preserves the discardable attribute dictionary and adds a regression through the existing affine unroll-and-jam path.

The change is 2 files, +3/-2. Local assertion-enabled Affine tests and the currently reported CI checks pass.

The main review question is whether preserving the discardable attribute dictionary is the intended Affine contract. 
The SCF implementation already preserves its applicable attributes in the corresponding operation.

  CC @matthias-springer , since you introduced
  `LoopLikeOpInterface::replaceWithAdditionalYields`.

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


More information about the Mlir-commits mailing list