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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to