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

    <tr>
        <th>Summary</th>
        <td>
            [mlir][spirv] Support index to spir-v dialect conversion
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            missing-feature,
            mlir:spirv
      </td>
    </tr>

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

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

<pre>
    Right now MLIR seems to only support index to llvm conversion. We should also support it on the spirv lowering path.

There's already one related user request / bug report on Discourse: https://discourse.llvm.org/t/need-help-in-better-understanding-scf-to-spir-v-lowering/71639:

```mlir
func.func @forward() {
    %c0 = arith.constant 0 : index
    %c32 = arith.constant 32 : index
    %c1 = arith.constant 1 : index
 scf.for %arg2 = %c0 to %c32 step %c1 {
        %1 = index.add %arg2, %arg2
    }
    return
}
``` 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU12PmzoQ_TXmZQQyBkN44CF7I6Qr3fuyrdRnBw_g1rGpP7Ldf18Zks1uu1LkwPjMnDPDGeG9mg1iT_gTYexHXIQjjBF-ykQMi3X9FsrOVr72z2peAhj7Av__9-8zeMSLh2DBGv0KPq6rdQGUkfgrRbW-XmC05orOK2sK-IbgFxu1BKG9fSQEsAbCguBX5a6g7Qs6ZWZYRVgKQk-EHvfz64IOCWs9CO1QyFewBsGhFgElRI8OHP6M6AMQNsA5zuBw47AGTsqPNjqPpDrCEsLqSXUkbCBskPerImkurJsJGwJhg0GU-YJ6zZXJzxgCujwaic4HYaQyc-7HKQ82T8rza36XTtjQlk3VJYZ3-klD999FK7eHpmjGIh1AajpZ9yKcJOxAWAekfdoxAACE8ZECqU4gnApLMVqTNARIweM-9I_oin0G36Kf4svP4OVfaD9OxWRdShFu3jl2ccHeeX3A9V7zfRM3qp1pK1oIKe-lCPvn7fGhrD09XhyG6MxtlveLt6FCJvtKdlUnMuzL5nBoeNnwLlt6Psn2MLaStbTs2qmhh6nkQpxLKqa65nWmekZZRVvalBWvy66gZc04r6eJMlGPoiM1xYtQ-s0gmfI-Yt9UbVllWpxR-9sKXZT3yRkTihCTXVNjKZ6-eXXcPH7bMNencvk5zp7UVCsf_IMgqKC3tdwS-Ynwpz2Xn-DLn7u2-w-kEhrH8G7rsuh0_9HtswpLPBejvRA2JLrbX746-x3H5PutOU_YsPX3OwAA__-20kXN">