[llvm-bugs] [Bug 47801] New: [RegisterScavenger] Spills dead register.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 12 08:15:53 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47801

            Bug ID: 47801
           Summary: [RegisterScavenger] Spills dead register.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 24047
  --> https://bugs.llvm.org/attachment.cgi?id=24047&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201012/f52be830/attachment.html>


More information about the llvm-bugs mailing list