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

    <tr>
        <th>Summary</th>
        <td>
            [APInt] Add APInt::clearBits() method
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            good first issue,
            llvm:support
      </td>
    </tr>

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

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

<pre>
    Similar to how we have APInt::setBits(unsigned loBit, unsigned hiBit), we require a APInt::clearBits(unsigned loBit, unsigned hiBit) method to zero out bits in the specific range

Noticed on #131989 - but we need something similar in a number of other cases - notably when manipulating DemandedElts masks for INSERT_SUBVECTOR
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMksFu2zoQRb-G2gxsyCPRjhZa2HEMBA_IK-K024IURxJbinTJoY306wspQdNNga4EHMxc3cGhSskOnqgV8iDksVCZxxDb5__Odgq-0MG8tmc7WacicIAx3OBGMKorwf7To2dR7UW1T8QHy0ngXfZLngEXDpYF3sNvMtqFNDO8EUT6kW0kUH8GdY5U_PcomIjHYOZmPykGCJlBW05gPfBIkC7U2d52EJUfSJR7Ue6fAtuODAQPAqtNtWnuGliBzjy38kQGUphzrR8gvZ9uPSjwedIUIfQQeKQInUqUYAU-sNLuFW4jeZiUt5fsFM_rR5qUN2QeHCeYVPqeoA8RHp_OD88vX8-fD18e7l_-fy5MW5mmalRB7WZXS8RtJctibLWpqq0xZY_KdPVOK9NtuxqNMabe9UoXtsUSZVnjpmxKKct108hdv6110yE1O1mJuqRJWbd27jqtQxwKm1KmdlNtpSwLpzS5tMhHHEIw0NuYGJYhgSjwXiDOu7PlfLmEyDOWxyK2M17pPCRRl84mTh8_YctueVNvbuUR9sb8TfSHyCJH147MlzRP4UngabA8Zr3uwiTwtBR5-6wuMXyjjgWelrJJ4On9qGuLvwIAAP__pbXtoA">