<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [mips] MSA instrinsic can cause an ICE."
   href="https://llvm.org/bugs/show_bug.cgi?id=30473">30473</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[mips] MSA instrinsic can cause an ICE.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>simon.dardis@imgtec.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When the 3rd argument to binsri / binsri exceeds the number of elements, LLVM
suffers an ICE.

Test case:

#include <msa.h>

void test() {
  v16i8 v16i8_a = (v16i8) {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
  v16i8 v16i8_r = (v16i8) {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
  v16i8_r = __msa_binsri_b (v16i8_r, v16i8_a, 25)
}

This occurs as due to an assert in APInt::getLowBitsSet() as the number of bits
set is greater than the result.

This requires patch for clang for custom type checking and one in LLVM to
report a fatal error.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>