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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL][SPIRV]  Add clamp intrinsic lowering
        </td>
    </tr>

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

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

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

<pre>
    Add an intrinsic like this one from https://github.com/llvm/llvm-project/blob/cfb86ae7497e43e9221ab890221789ae320381e9/llvm/include/llvm/IR/IntrinsicsDirectX.td#L25C1-L26C118
to 
https://github.com/llvm/llvm-project/blob/1e6ce5e284f5c0e8d64eee21af727bb164eb3caf/llvm/include/llvm/IR/IntrinsicsSPIRV.td#L59

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

and implement the three `Clamp` Lowering:
https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html#FClamp
https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html#UClamp
https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html#SClamp
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8lE9vnDAUxD-NuVhB9rPNnwOHza5II-2hyqpRrwY_FjfGrGzTKv30FWyi5FKprZReDEIw_s1jPDpGe_aIDVG3RB0yvaRxDs2gw8_Zu6ybzXOzM4ZqT61Pwfpoe-rsE9I02khnj3QI80THlC6RiB2BlkB7tmlcuryfJwKtc99fLzeXMH_DPhFoOzd3BNp-6KpCYynrEqXAGoDrrqoZAC-rWqMAJiqO9ZuO9b1bDL49uH9Yl1e4eLAB-_Q1T4aAOILa85sjFHvOK8IOhO3STK83_4rMsehRIVRyUD3DyhQSEYHroYSy63ghsRO9Hv4c-fT5_uHxBVjVV7rrulyMTuuskfZOT5d8dNHRxdtEE8a04f8vM73T_kygXTcm0O5ng3foPx1Px1VusS5ZH6_vvYC-d6K9oXa6OJzQp81QGgMiJQXbrx-QgtHj_AOD9effuAp4tjGF5_xpDLOfYz6HlWed3s0jgTZesF8BeM4ItHfH0zGPyeRSsXxMkyMg2utWH6L95QO1T5t2ZhphalHrDBtecig4lADZ2BSFrKAsoRBCKYGcDx2rAGWpTD3Ugme2AQaSSVYBlwogB8kUF9zIWmhhjCCS4aSty9eUrHyZjXHBpqqYgszpDl3cKgLg-sOBwJ4AdLp_Qm-I2L26gbVFQrOlrVvOkUjmbEzxTTnZ5La-2ZTUgajb7QAQdaB07ZotQO_r5iUW2RJc89dB34ys4928_AoAAP__IzuIhQ">