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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Propose generic bitfield intrinsics 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>
          bogner
      </td>
    </tr>
</table>

<pre>
    As per the conclusions in #87367, we should propose adding bitfield instructions as generic LLVM intrinsics. Specifically, we need operations for [Bfi](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#bfi), [Ibfe](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#ibfe), and [Ubfe](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#ubfe).

These operations exist in several ISAs (sometimes spelled differently, as in BFX on ARM archs), so I think it's reasonable to argue that having a generic for intrinsic for them is useful.

### Acceptance Criteria
- Either consensus from the LLVM community that we should add these operations, or a well reasoned rejection
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8lE1vtDYQxz-NuYyyYs2ywIEDmxQ10j5S1bRVrsYeYFpjI49Jmm9fmd3npZfnGAkJIWb8n5ff34qZJofYivIiyqdMbXH2oR385DBkgzcfbcewYoA4I2jvtN2YvGMgB0IWdVWcKyEf4R2BZ79ZA2vwq2cEZQy5CQaKI6E1QI5j2HTcsxXDhA4Dabhe__oC5GIgx6T5AC8rahpJK2s_7kc7RAN-xaBu6aMPIMrLZSRRPglZzzGuLIpOyF7IfqI4b8NB-0XIfiEdPPsxCtk_UUAdX19mZTA8-mUli0HIfrB-SKGKnJC98ZpT8Ovz9RA4ClkMIwnZpFpEeXkeRvwUVUpCN1nlTJL-87Okt5v0QeSdyLs_ZmT8cfz4L3FMBDC-YVAWnl86BiFr9gtGWpCBV7QWDRgaRwzo4m2Xagfn0r-Cd9D9_gVU0DPfu2QPzxBncv8ARSErhoCKvVODRYgeVJg2hDirCLN6S3CpbxQlIr5BtH_FGRcgho1x3Oy9FSGL2wOd1rhG5TTCY6CIgZTIuwf4heKMIaHO6HhjGINfdvp3ULVfls1R_LjV8R17ZUyK-t-gUlM-gIJ3tPbeDBoI-DfuPshMW5imaFSG7bE6FnXeHIsim1tzNmdtjqppqtKU6lxJKc9NnitpalOddUatzOUpP0l5rPOyKA61KYaxkE2dy6Iq67M45bgosgdr35aDD1NGzBu2dXM-HTOrBrS8m15Kh--w_xRSpjsgtCnnYdgmFqfcEkf-fkqkaPfb4tfry1WUT_Db3e5fF_GD379aOq08DS_bgm1_Qm4Sub8e1uDTkITs99ISn3vp_wUAAP__xgSOwA">