)]}'
{
  "commit": "d725513e7d92a2f815eb19c3aee06b599b42e834",
  "tree": "96ae860852196d9557c4ddd72db72b86f0eb5490",
  "parents": [
    "a7bf24919f879fed809b16bff33623d821b11226"
  ],
  "author": {
    "name": "Mehdi Amini",
    "email": "joker.eph@gmail.com",
    "time": "Fri Apr 03 10:17:50 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Apr 03 10:17:50 2026 +0200"
  },
  "message": "[MLIR][Affine] Fix null operands in simplifyConstrainedMinMaxOp (#189246)\n\n`mlir::affine::simplifyConstrainedMinMaxOp` called\n`canonicalizeMapAndOperands` with `newOperands` that could contain null\n`Value()`s. These nulls came from\n`unpackOptionalValues(constraints.getMaybeValues(), newOperands)` where\ninternal constraint variables added by `appendDimVar` (for `dimOp`,\n`dimOpBound`, and `resultDimStart*`) have no associated SSA values.\n\nPassing null Values to `canonicalizeMapAndOperands` risks undefined\nbehavior:\n- `seenDims.find(null_value)` in the DenseMap causes all null operands\nto collide at the same key, producing incorrect dim remapping.\n- Any null operand that remains referenced in the result map would\npropagate as a null Value into `AffineValueMap`, crashing callers that\ntry to use those operands to create ops.\n\nFix: Before calling `canonicalizeMapAndOperands`, filter null operands\nfrom `newOperands` by replacing their dim/symbol positions in `newMap`\nwith constant 0 (safe because internal constraint dims should not appear\nin the bound map expression) and compacting `newOperands` to contain\nonly non-null Values.\n\nFixes #127436\n\nAssisted-by: Claude Code",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ee893c14c9c6b8d777fc613451a7a6d901886d85",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/Affine/Analysis/Utils.cpp",
      "new_id": "ebe932a14694ab78459eee86fd8d0a996ddb210d",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/Affine/Analysis/Utils.cpp"
    },
    {
      "type": "modify",
      "old_id": "5b65c49ea6ed18b613e9b99df2171d9ad77eb663",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/SCF/foreach-thread-canonicalization.mlir",
      "new_id": "9d0c65e06d3608e94db124a0f7391aeb19c9b9ee",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/SCF/foreach-thread-canonicalization.mlir"
    }
  ]
}
