[LLVMbugs] [Bug 194] NEW: [indvars] Induction variable canonicalization always makes 32-bit indvars

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Sat Dec 20 18:52:46 PST 2003


           Summary: [indvars] Induction variable canonicalization always
                    makes 32-bit indvars
           Product: libraries
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: sabre at nondot.org
        ReportedBy: sabre at nondot.org

The induction variable canonicalization pass inserts new canonical induction
variables if a loop is lacking one, but it always chooses to insert a 32-bit
induction variable.  This can turn legal loops into infinite loops, such as this

long long V;
int main() {
  long long X;
  for (X = 1; X < (1ULL << 33); ++X)
    V = X;
  printf("%lld\n", V);    // erroneously not reached

Though always introducing 64-bit induction variables would be acceptable, the
right approach is to insert a variable which is the largest of the existing
auxillary induction variables.


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