[LLVMbugs] [Bug 944] NEW: Unrolling loop creates register pressure

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Oct 11 17:06:38 PDT 2006


           Summary: Unrolling loop creates register pressure
           Product: libraries
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: isanbard at gmail.com

When run through the optimizer twice, the following code:

int value(uint64 b1, uint64 b2)                                                                                   
  int i, j, k;                                                                                                    
  int value = 0;                                                                                                  
  for (k = 0; k < 2; k++)                                                                                         
    for (i = 0; i < 6; i++)                                                                                       
      for (j = 0; j < 2; j++)                                                                                     
        if ((b2 & 0xf << (j + i * 6)) == 0xf << (j + i * 6))                                                      
          value += 1000;                                                                                          
  return value;                                                                                                   

gets unrolled into two loops. However, this creates a ton of register pressure, and, as a result, many 
more spills/loads are added which the code running only through the optimizer once doesn't have.

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