[llvm-bugs] [Bug 32632] New: IndVarSimpify does not eliminate dead-loops with variant induction variable.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 11 14:32:29 PDT 2017


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

            Bug ID: 32632
           Summary: IndVarSimpify does not eliminate dead-loops with
                    variant induction variable.
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: farhana.aleen at gmail.com
                CC: llvm-bugs at lists.llvm.org

IndVarSimplify does not handle dead-loops with variant induction variables.
It does not eliminate the comparison if the iv is loop-variant such as j in the
program below.

Here is the program of the 
#define N 100
unsigned int b[N], a[N];

void foo() {
  unsigned int i, j, k;

  for (i = 84; i > 1; i--)
   // dead-loop
   for (j = i; j < i; j++)
    for (k = 1; k < 7; k++)
      a[i] = b[k];
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170411/1a51452a/attachment.html>


More information about the llvm-bugs mailing list