[LLVMbugs] [Bug 1071] NEW: X86 can generate movb al, eax ?

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jan 2 20:52:03 PST 2007


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

           Summary: X86 can generate movb al, eax ?
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rspencer at x10sys.com


While testing this function:

define bool i32() { ret bool true; }

I noticed that it is possible for the X86 backend to generate:

movb al, eax

which doesn't assemble. 

To make this happen, go to CodeGen/SelectionISel.cpp in the visitRetInst
function and make it *not* do an extend (of any kind) for boolean. This will
cause the Legalizer to apply an ANY_EXTEND which, presumably, means that not
doing an extend is okay.  While that change is not correct, the X86 backend
shouldn't generate incorrect instructions either.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list