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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Implement clang_elementwise_builtin_alias
        </td>
    </tr>

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

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

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

<pre>
    There is an RFC on the llvm discussion board here that discusses implementing an elementwise alias:
https://discourse.llvm.org/t/rfc-elementwise-attribute-in-clang-front-end/76342/14
This alias will enable a user to define functions arbitrarily, and create an alias for an elementwise version of the function, and output a vector of outputs.
The purpose is to get around the llvm community's hesitation to implement the tan intrinsic. This alias can allow users to define tan on their own terms, and then users can use elementwise versions of tan in their code. It will also set the stage for easy substitution whenever the llvm community agrees on how to lower tan (whether that be creating an intrinsic, or using libcalls).

Blocks:
* tan
* atan
* cos
* acos
* ...

AC: When an hlsl developer is able to use this alias to create any arbitrary function, and give the function a vector of inputs, and the function produces a correct vector of outputs, the alias has been implemented correctly.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVMGO4jgQ_RpzKREZB7rJIQemR2hHmtPuSHtsOU4l8a6xkatMxN-vbEJDb88JY1e9qvfqpTSRHT1iK3bfhFJd6PaykTuhlNh9X-nEU4jt_XbVhf7a_powIlgC7eHP4xsEDzwhOHc5QW_JJCIbPHRBxx5KLE-a709IYE9nhyf0bP2YQfD2b7aEoJ3VJOqDkIeJ-VyO6ijUMaeHFAmrXKgKcRTqyEId42DWTwhrzRxtlxjX1q-N035cDzF4XqPvhTq-vtRbJdRxsxXy8GvKNHJJmK1zgF53DkFDIozAAXocrEcYkjdsgyfQsbMcdbTuKtQbaN-DiagZM5Eb0hDi_1ldMBZNwlCkusPdEULic2LQcEHDIeaw2xVVpUmEc4rnQEV1DjAig44h-f6hvAmnU_KWr0K9EkxIlnWukeM_BC_hrD1Yz9F6sqaCJw1M4eDCXPjTkwA55zZnGyHMHhjjie7984R-SckQifB37KnQL8UXIBN6rOAH38TXjgIQ3pok1iMWKVHTFSh1xJZTYTRP6PGSB_SFPOgxIlLudQpzJuDCnCO1B6H284Q8lUTN0OFtdIsLPyTJrEKERPnB2c5o50ioJs9CyMM3F8y_i0WFOmTo5aQfRxPofvk4VtUCcXgT9QH-zqppD5MjBz1e0IUzxvJhZRNyKELyYzwcHl67fjjx-sVOo73gJ599cpb12VhPo3uEnWPok0ECDSbEiIa_OjIn5qRbS5Mm6BD9w2LY33PdtVr1bd03daNX2G5e5cvLdqv29WpqNe6GusGm3stX7KSpNcqhrxup9H4j97iyrZJqKze13DS7jaqretjVjeo2jUJZ79VWbCWetHUf62BliRK2eym3-5XTHTpalprHGcrjstVim3PWXRpJbKWzxPRAYcuubMM_fv71U-y-w4-Pj6csk_cnZ793yTq2_r2IsUrRtZ-X1mh5Sl1lwkmoYy6x_KzPMfyDJq-v0hgJdSyN_xcAAP__kTDrFg">