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

    <tr>
        <th>Summary</th>
        <td>
            [SPIRV][HLSL] Implement `frac` lowering 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            HLSL,
            backend:SPIR-V,
            SPIR-V
      </td>
    </tr>

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

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

<pre>
    This work needs to come after: https://github.com/llvm/llvm-project/issues/87776

once we have `llvm.frexp` we need to test if the support alreadt exists. If it doesn't we need to add it. 

update the frac.hlsl unit tests:
https://github.com/llvm/llvm-project/blob/1e6ce5e284f5c0e8d64eee21af727bb164eb3caf/clang/test/CodeGenHLSL/builtins/frac.hlsl#L2

example:
https://shader-playground.timjones.io/020254826814c6bfb01e671c08c15db4

and implement the `OpExtInst Fract` Lowering:
`%13 = OpExtInst %v4float %1 Fract %12`
https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html#Fract
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU0uP5CYQ_jXlCxoLyu-DD7Pb8WaklhJlor1jKLfZocECPI_8-gjP7mwfkkOUi42Fq75XlYzRXBzRCM0naE6F3NPqw7jI8Jd3tpi9fhv_XE1kLz48MUekI0ueKX8lJpdEAap7tqa0RajuASfA6WLSus-l8lfAydrnH6-7LfhvpBLgZGLcKQJOfdd1LfAT8Pv3p3eK2AuxVT4Tg5bnwnIJ9LpBy_NFppAZJIqJmYWllVjct82HxKQNJHVi9GpiiiV7WJhJTHuKDrBLt-VSa2ZSyW6x903LREfHJUhVrjZatjuTDrBD4PHff5Y7Wz8DToJaRQ1hXy-N4tTrtiYiFHLpsJtn0dY0V0ougJOy0l0ApwwMOH32mr6Q-_X8eM7tdmOTcdm_D56A1RlvxdCrvG6W_oV0XKWmcLdZ-XYJfne6TOb6zTuKpfGAE0eOTd1j24tatfMyc0FtJxTvlWj0XN8iSaeZyVhXculwD1r-2_bLa3pwMbEpSJVyeGf_QsG4ywclaDlgIyoG1Yn9LABsnuvFenkcxXuD44i54h_UBLqYmMJb-bQG73wsfcjmPf7-8Mfd16x2I5XdEiUHnL6cH89lTLqsG16u6Zq9OzAKPVZ6qAZZ0Cg6ga2okQ_FOnLF-27paqq5rJahrUVTISnR1zMq1TSFGZFjzWveIwrOhxLVMIhFL7zVwywUQs3pKo0tj3n24VIcKzD2PW-GwsqZbDxWEPE9ZAT8DIizVE_kNFT3P8R8v_j52ZyKMB4DN--XCDW3x_B_ACWT7LHeueQrNCdoPh0YzYk9fMQGLc-zlHOy33NixR7s-D92O2v7OwAA__9lzVoB">