[LLVMbugs] [Bug 7980] New: RegAllocFast doesn't set correctly kill flag on implicit use registers

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 24 02:25:46 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7980

           Summary: RegAllocFast doesn't set correctly kill flag on
                    implicit use registers
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Register Allocator
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: quickslyver at free.fr
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5408)
 --> (http://llvm.org/bugs/attachment.cgi?id=5408)
reproducer source

That's bad for later passes, like  Register Scavenging.

Reproducer: download the attached test.ll file

$llc -O0 -debug test.ll -verify-machineinstrs

*** Bad machine code: Using an undefined physical register ***
- function:    compare
- basic block: entry 0x93ec8a4 (BB#0)
- instruction: JE_4 <BB#4>, %EFLAGS<imp-use,kill>
- operand 1:   %EFLAGS<imp-use,kill>
LLVM ERROR: Found 1 machine code errors.


CMP32ri8 %EAX<kill>, 1, %EFLAGS<imp-def>  
%DH<def> = SETGr %EFLAGS<imp-use,kill>    <- ****ERROR IS HERE, EFLAGS is not
"kill" !!!!*****
MOV8mr <fi#1>, 1, %reg0, 0, %reg0, %DH<kill>; mem:ST1[FixedStack1]
MOV8mr <fi#2>, 1, %reg0, 0, %reg0, %DL<kill>; mem:ST1[FixedStack2]
JE_4 <BB#4>, %EFLAGS<imp-use,kill>

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list