<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - PowerPC - miscompile yields infinite looping when using -code-model=large"
   href="https://bugs.llvm.org/show_bug.cgi?id=33547">33547</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PowerPC - miscompile yields infinite looping when using -code-model=large
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>4.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>eric.schweitz@pgroup.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18684" name="attach_18684" title="reproducer reduced from larger program">attachment 18684</a> <a href="attachment.cgi?id=18684&action=edit" title="reproducer reduced from larger program">[details]</a></span>
reproducer reduced from larger program

This bug appears in the release_40 branch on PowerPC.

To reproduce:

% opt -O2 bug.bc -o bug.opt.bc
% llc bug.opt.bc -mcpu=native -code-model=large -o bug.s

In the prologue for z0042(), there should be the following sequence

# BB#0:                                 # %L.entry
        addis 3, 2, .LC0@toc@ha
        bl .L0$pb
.L0$pb:
        ld 4, .LC0@toc@l(3)
        mflr 3
        lwz 4, 0(4)
        cmpwi    4, 1
        bltlr 0

which is a call from the prologue to the next instruction. This call sends the
program into an infinite loop.

The reproducer has reduced from a much larger code to isolate this specific
code gen pattern.

The SVN commit that results in this failure was 287059. Reverting that
changeset eliminates the infinite loop and corrects the test application.</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>