<html>
    <head>
      <base href="http://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 --- - llc crash during GenericScheduler::initPolicy()"
   href="http://llvm.org/bugs/show_bug.cgi?id=18572">18572</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llc crash during GenericScheduler::initPolicy()
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>stephen.montgomery333@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>atrick@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11915" name="attach_11915" title="Simple test case">attachment 11915</a> <a href="attachment.cgi?id=11915&action=edit" title="Simple test case">[details]</a></span>
Simple test case

The attached .bc file, when compiled with:

llc -enable-misched foo.bc

causes a crash when the GenericScheduler's initPolicy() is called. The file was
compiled using clang for the MSP430 target which has only i8 and i16 registers.
The test in initPolicy(), which attempts to save compilation time by not
tracking register pressure for small regions, assumes that the target supports
i32 types. Since the MSP320 doesn't support them, getRegClassFor() throws an
assertion.

I guess the fix is to use the largest integer type no greater than i32 that the
target supports, or something like that.

I was working with the LLVM 3.4 release when I noticed this. A quick inspection
suggests that the bug is still present on the trunk and has been present since
around revision 189,991.</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>