[LLVMbugs] [Bug 15720] New: LoopVectorizer fails to vectorize loops with increasing integer induction variable

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 10 23:19:22 PDT 2013


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

            Bug ID: 15720
           Summary: LoopVectorizer fails to vectorize loops with
                    increasing integer induction variable
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: reachanadi at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Loops having integer induction variable running from lower value to higher
value as shown in example below(0 to SIZE) are not vectorized.

int foo(int *aa, int *bb, int SIZE) {
  int count = 190;
  for(int i=0;i<SIZE;i++) {
    aa[i] = bb[i] + count;
    count++;
  }
}

However, loops with integer induction variable running from higher value to
lower value(SIZE to 0) are successfully vectorized as in the example below.

int foo(int *aa, int *bb, int SIZE) {
  int count = 190;
  for(int i=SIZE;i > 0;i--) {
    aa[i] = bb[i] + count;
    count++;
  }
}

-- 
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/20130411/cab9e018/attachment.html>


More information about the llvm-bugs mailing list