[LLVMbugs] [Bug 5769] New: Coalescer deficiency

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Dec 12 11:03:25 PST 2009


           Summary: Coalescer deficiency
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: asl at math.spbu.ru
                CC: llvmbugs at cs.uiuc.edu

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

Consider attached code. The output of the codegen is:

        cmp.b   #0, r14
        mov.w   r15, r12
        jeq     .LBB1_2
        rla.w   r12
        sub.b   #1, r14
        mov.w   r12, r15
        jne     .LBB1_1

Note that two moves of r12 <-> r15 are fully redundant and can be coalesced

Even worse, the mov inserted inside loop is quite expensive, at least it should
be outside. It resulted from the phi node in LBB1_2 basic block, so, definitely
a code pessimization here.

Funny, but turning i16 to i8 yields optimal code.

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