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

    <tr>
        <th>Summary</th>
        <td>
            How to add a custom instruction based on RISCV Vector extension in LLVM
        </td>
    </tr>

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

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

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

<pre>
    Hi! Community

Here I want to add a custom instruction based on RISCV Vector extension. In RISCV Vector extension, we know that there is an instruction "**_vwmaccu_**" which function is "**_Vector Widening Integer Multiply-Add_**". I want to add a custom instruction which is parallel to "vwmaccu", in other words, the function is very similar to it. For example, "Vector Widening Integer Multiply-Shift" to realize some specific application. The instruction format could be basically similar, except that funct6 is different to distinguish functions. And then I will add some arithmetic logic to a RISCV core to implement the function(but it is future work). 

I want to know what I need to modify or add in complier level to implement such instruction. 

Thank you in advance!

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydU8tu2zAQ_Brpsogg0ZZjH3RwHQQxkFyaID0WFLmy2FCkwIcV5-u7lNM6ORQtCki0-NqZnRm3Vp6aO5WxCnZ2GKJR4ZSVN1m5PY936BD2MHETIFjgUgIHEX2wAyjjg4siKGug5R4l0MfX_ePuGZ5RBOsAXwMaT_sF7P-0lbEdTAgvxk4Qek4wfcJUHrj5BJExlrEtPd-P08CFiN_PU1qHqVeihy6a81G6fDn9DvhNSTTKHIhJwAM6eIg6qFGfrrZSXkoV_9LtGY5QRu641qjTabr8TmzG3tENsKkZmKyTPq3Q7BPJI7oTeDUozV0qoUIBt7M4fBg1pitU668NPPaqC0kGKuGQa_WG4O1Aw4hCdUoAH0etBA-zFU_E4mM3nXUD6S5s1BJaTF7SWa1_U0s88FXgGM4OzS2sUgNSdR25dZZLKh-IX1T-YoUvYGtkatwkYZXWs6ozO-5U6AcMxE_bA41J8veUCEsZSIokHYYZ4IN2GVu3MZBciUMXQ6TDJPJLxjYFfIzvxcs5X1NivweDlFVaGyzxPwFpmziRXcISnCJpNR7Ppl7wfUyWX2T7DPTUc_MCJxtTGS6P3Aiyrzpv5thUq1XJNstltcxls5CbxYbnQQWNzV3K_f__sxLe_f3zQx6dbvoQRp8tKMe39BxI3tgW1BRNtD7--rkanf1BZWiqvI9I0bytr6uqzvtm3da4WZYc6_WaSazEkqGUfIEda8vrss01b1H7Jqu_UOAMTjCXSImvb3LVsJKxcl3RWy8Wi6KsRF2t6jVbr1grlmW2LHHgSheJR2HdIXfNTKmNB0-bmiLkL5vce3Ugt2Y4qs9j6K1rvOgnXr3lM3QzU_8J4ueeyw">