[LLVMbugs] [Bug 2635] New: x86 codegen for long AddRec expansion could be improved

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Aug 4 17:44:54 PDT 2008


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

           Summary: x86 codegen for long AddRec expansion could be improved
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu


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

IL attached, generated from the following testcase:

int a(unsigned b) {
  unsigned
x1=0,x2=0,x3=0,x4=0,x5=0,x6=0,x7=0,x8=0,x9=0,x10=0,x11=0,x12=0,x13=0,x14=0,x15=0,x16=0,x17=0,i;
  for (i = 0; i < b; i++)
{x1+=x2+=x3+=x4+=x5+=x6+=x7+=x8+=x9+=x10+=x11+=x12+=x13+=x14+=x15+=x16+=x17+=1;}
  return x1;
}

The issue is essentially that CodeGen ends up spilling the result of almost
every single instruction; I haven't actually tried to hand-optimize it, but I
think that if it actually did all the operations in the best order, and it was
clever enough to remat the additions, it wouldn't have to spill anything.


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