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

    <tr>
        <th>Summary</th>
        <td>
            [mlir][affine] Should't AffineExpandIndexOpsPatterns be part of affine -> standard conversion?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

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

<pre>
    I see that [ConvertAffineToStandard](https://github.com/llvm/llvm-project/blob/69ec35fbecc74b3dd917b659e082ce2353303ca9/mlir/include/mlir/Conversion/Passes.td#L38) pass can't handle [affine.delinearize_index](https://github.com/llvm/llvm-project/blob/69ec35fbecc74b3dd917b659e082ce2353303ca9/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td#L1060). It's lowering is available [here](https://github.com/llvm/llvm-project/blob/e4c8c5851738b7475efa1b9d500078133159369a/mlir/include/mlir/Dialect/Affine/Transforms/Transforms.h#L39). It is state that this may introduce not only Affine ops. Currently it seems other than Affine ops it only uses `arith.constant`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEk81urDYUx5_GbKyLjI0BL1jcZII0UqVETfbVMT4Mrjw2sk2a6dNXQD7aZdTFXSED58i__wekZC8esSfyjshTAWueQ-xTuEDMEAsdzK0_04RI8wyZEnl3H_wrxvxzmqzHl_CcwRuIhsgT4d2c85KI-En4QPhwsXledTmGK-GDc68fjx9LDH_imAkftAua8KFROAo5aRzHttbCGFW1upEKWcdH5EIKwcQIivDh6mwkfLB-dKvBrxfHvZINnvDhCVLCVGZDuPhNdIQrukBKdARPeJvpDN443HBg5ygNOusRov0b_7De4Nsv5zlZcMfOQ2rCh_Pvn6fH5YOuYg0jXJX0nAlvE3XhL4zWX6hNFF7BOtAH6YwR_x8V1mM3yk5Wreh0W7cSJ6i0MpIx1naVEJVUolHwPaqXCD5NIV7Tfw7lvHun3tk2nJQhvwcxzzbRK9yo9TkGs45Ifcg0eHejx2YallTS-zVG9NndqM1bjK-Jhjxj3Lb4f_25fd6H14SJkoZBtHkux-BTBp9Jw8rC9MIooaDAvmqZlKytK1XMPVNgWtlMExOTMhNUBqCVXVeBbqpGdoXtOeM1q6q2apgQqkStp4l3k2iwBpCc1AyvYF256V6GeClsSiv2bVfLrnCg0aW9opwfOvKtrLHfbdLrJZGaOZty-lqQbXZ7rfcBefqMOpEn-jyH1Zm9CYcED28LeHPegv-4pCfIGaNPVCNdIGYaJnoM0x9EPGw-7J2n41fnxFCs0fXfjtYOujm_s_4TAAD__3zHefM">