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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Add support for floating point modulo
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    clang-dxc is using c rules for modulo. That means modulo is not supported for floating point types.

https://hlsl.godbolt.org/z/zxxqqE7jG

## Errors
```bash
<source>:2:16: error: invalid operands to binary expression ('half' and 'int')
<source>:6:16: error: invalid operands to binary expression ('float' and 'int')
<source>:10:16: error: invalid operands to binary expression ('half2' (aka 'vector<half, 2>') and 'int')
<source>:14:16: error: invalid operands to binary expression ('float2' (aka 'vector<float, 2>') and 'int')
```

support needs to be added for float, half and the vector version of those two. 

DXC does not support double or double vectors when targeting SPIRV or DirectX so that will become the default spec for now.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVF1v0zAU_TXOy9Uix06a9iEPpV0BaQ-IIbRXJ75JPFw7s522269HTjJgAsSkIbXyR-xzzr06PsJ71RnEihTvCGOtcE_WaMIYKfaJGENvXbVsJrWVj1Wjhemu5KUB5WH0ynTQgBs1emitg6OVo7YpfOlFgCMK45eteNzYAH4cBusCyul4q60IEWOwygQIjwP6lNAtods-hMETviXsQNih116nnZW11SG1riPs8BT_l8vDw3V5_36-QxgnjMO1c9b5uF7R-VcL38c133k7ugYJvyZ8ywjfZivCt4DxRpwocxJaSbADOmGkh2ChVka4R8DL4NB7ZQ0Qtias7IVuCStBGAmElcoEwkrCNr8Trd5GNHXpdUwZfXtNLFIRthbfRGQ7YRMi0G6udwcsUk38rxGU_4fa_6Zoacw_JT3bYHbJYkEwiAs3gpDyV0tGzFjuhBZ6hJkSTugmbbaF0FuPEM42hRl2f7cDafGFzUHasdYI1j3PZiAP5x4NBOE6nPx_--nj56_x2F45bMIdeAshvqGz0hpqbOwRJyESWzHqAH7AZtJr7DlNZMXlhm9EglVW5jkreE7zpK82G0bXGa_beoUZzcRmXeeyFbwsW940YpOoilFW0DyjcaB5ysu2oCu6KlcFZbIpSE7xKJROtT4d48tLlPcjVhkvMsYSLWrUfkkPg2eYvi754ap46aoeO09yqpUP_idMUEFPsfPh5vaGFHvYSvmjbX_IhjlGktHp6mU0dCr0Y5029kjYIcIvw9Xg7D02gbDDJMoTdlhUnyr2PQAA__-x3JVQ">