[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


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

           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)
Testcase

Consider attached code. The output of the codegen is:

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

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

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