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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Improve logic for choosing spv/dx intrinsic at CG
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement,
            clang:codegen,
            HLSL
      </td>
    </tr>

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

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

<pre>
    Follow-up from: https://github.com/llvm/llvm-project/pull/82536

More target-specific intrinsics are going to be added that are effectively shared between SPIR-V and DirectX backends, so we need a better design for HLSL CodeGen than repetitive switch/if statements on the target. There are a few possible patterns discussed here: https://github.com/llvm/llvm-project/pull/82536#discussion_r1506827420.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykkk-P0zAQxT-Ncxm1cid_mhxyKK2yrLRIiEWIG3LsSWJw7cjjtOy3Rwkse0ZcEtme8Zv381PMdvRErSjfifKSqSVNIba8mOBVUs5S1gfz0nbBuXDfLTMMMVxFfoIppZlFfhLYCexGm6al3-twFdg5d3v97eYYvpNOArt5cU5gV2OZV0JehDz9_n4IkSCpOFLa8UzaDlaD9Slaz1YzqEgwButHSAF6AmUMGUiTStsRDQPpZG_kXoAnFclAT-lO5OH54-On3RdQ3sDFRtLpK_RK_yBvWOAZOMCdwBMZUGtPogiGVh4whAjvn56f4BwMPZBf5TxEminZVQv4bpOeBHZ2AE4q0ZV8Yghr5aubPXyeKNI2pYKB7jAHZts7glmtap7BWNYLMxlYS_-fK-Z_brTBf4uHUlY1HguU-8y0uWnyRmXUHo6yKY9ljUU2tbrsdaNqXaNupOqHAavCHJs6H3KDujKZbVFiIXNZHOqDxGJfNdLIWmKOjToUx0oUkq7Kuv062D7EMbPMC7V1XteYOdWT4y1fiOQn5fUGSyAKPAtE7ZQfRX7SwdBI_u_-yn9dlJcstpvnfhlZFNJZTvwmlmxyW363hvICj9c5hhuBC6PV21PqKQReE8TzTWBnfr7lC1SC80O2RNf-M_nNJq_sV6e_AgAA__8AshWC">