<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/127436>127436</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [MLIR] mlir::affine::simplifyConstrainedMinMaxOp creates null operands
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            mlir:affine
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            matthias-springer
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          bondhugula
      </td>
    </tr>
</table>

<pre>
    @matthias-springer - this appears to be authored by you (didn't carefully check full history though). The code is sending potentially null `Value`s to canonicalizeMapAndOperands (`newOperands` can have null Values). You can't send null operands to the method regardless of whether their identifiers appear in the map. So this is a bug.

https://github.com/llvm/llvm-project/blob/9b7282e545d5e47315e3ffb9e5e00d0fb547c8e3/mlir/lib/Dialect/Affine/Analysis/Utils.cpp#L2282
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk0-LwzYQxT-NfBnWyJL_HnxIdwkUNiz0H_QoW2NrWkUykrzb9NMXOQlL6amnDPG838w8P6sYaXWII2t-YEJcVUqGVHyJWyC3YmBCsOatUHsyPoyTd9rs625VMXl9G1nN_6OAF0iGIqhtQxUiJA8Twh2AGqYb3PwOTPSatGOiSzCrgMtu7Q1mg_OfkGswFJMPN0jG76thYijhF4Mwe41AESI6TW6FzSd0iVRWu6xjLf9N2R1Zy4_Zs3Le0aws_Y0XtZ2c_tgwKKdj3oG13OHX8x_W8twPRn3inXag4jH9d7_nh8fGefq9wT9hyUMyCFdMxmsIuKqgLcYIfoEvg8lgyA0UgHTeeCEMT5OA3F2sthJ-9nf_soUw7WvJ-Inxk0lpi0yemDgzcV4pmX0qZ39l4mzt5_PnZQv-D5wTE-fJ-omJ8zB1ohfY1I1usO5k1aBclmnABjnXfJmaupt7lEycr5ZC5lDWvZGyd9BpWchhLpyyt0iRifOviWws521jQr4L0YtCj1IPclAFjlUnh67teTUUZhTVsCwDdnOFumqGqhIdYqVa2bbDNMiqoFFw0XBRdbxupBxKxXtEJedeS9k3bc1qjldFtswHlj6sBcW441iJrpZtYdWENj7yO-1rTqx4zVnO58iTeqx_5DiMh0vTvkZWc0sxxW9somSPD-Hy_uNPrHmDB-EbctSRrpul5fbqXUxBkUN9IXdRf31sMAdUCeO_s1HswY7_-_0dR2avH3d-juKfAAAA__9N8DZS">