[LLVMbugs] [Bug 2243] New: PHI coalescing / tail merging missing opportunity

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Apr 20 15:45:26 PDT 2008


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

           Summary: PHI coalescing / tail merging missing opportunity
           Product: libraries
           Version: 2.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: code-quality
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org
                CC: resistor at mac.com, evan.cheng at apple.com, dalej at apple.com,
                    llvmbugs at cs.uiuc.edu


Running llc on the attached bc file produces this code:

__Z9ins_innerPdS_:
        pushl   %esi
        movl    8(%esp), %eax
        movl    12(%esp), %ecx
        cmpl    %ecx, %eax
        movsd   (%eax), %xmm0
        je      LBB1_5  ## bb30
...

LBB1_4: ## bb26.bb30_crit_edge
        movl    %edx, %eax
LBB1_5: ## bb30
        movsd   %xmm0, (%eax)
        popl    %esi
        ret
LBB1_6: ## bb15.bb30_crit_edge
        movl    %edx, %eax
        jmp     LBB1_5  ## bb30

Tail merging should have eliminated LBB1_6, replacing references to it (there
is only one) with LBB1_4.  However, the fault was really originally PHI elims
fault: it should have only inserted a copy for the entry block, instead of
inserting two copies elsewhere.  Owen's strong phi elim will hopefully fix this
one day.  Until then, tail merging should do the right thing.

This comes from a version of the testcase from PR2235.


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