<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 - [RegisterScavenger] Spills dead register."
   href="https://bugs.llvm.org/show_bug.cgi?id=47801">47801</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[RegisterScavenger] Spills dead register.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>paulsson@linux.vnet.ibm.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=24047" name="attach_24047" title="reduced testcase">attachment 24047</a> <a href="attachment.cgi?id=24047&action=edit" title="reduced testcase">[details]</a></span>
reduced testcase

llc -mtriple=s390x-linux-gnu -mcpu=z13 -O3 ./tc_regscav.ll

*** Bad machine code: Using an undefined physical register ***                  
- function:                  
- basic block: %bb.0 bb (0x2aa051adc30)                    
- instruction: STG killed $r6d, $r11d, 168, $noreg :: (store 8 into %stack.26)  
- operand 0:   killed $r6d          

In the test case, register $r6D is killed early in the block by it's only user.

Later in that block, RegisterScavenger decides to use that register for a
virtual register created during Frame Lowering (scavengeFrameVirtualRegs()).

This seems to mean that the RegisterScavenger should actually not need to spill
the register, since it is not live.</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>