https://bugs.llvm.org/show_bug.cgi?id=38853
Bug ID: 38853
Summary: Not vectorized trivial case since LAA (SCEV) fails to
figure out exit counts
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedb...@nondot.org
Reporter: balarishi.bhog...@amd.com
CC: llvm-bugs@lists.llvm.org
Created attachment 20848
--> https://bugs.llvm.org/attachment.cgi?id=20848&action=edit
Testcase to reproduce the issue
BUG DETAILS:
LLVM is not able to vectorize below trivial case:
----------------
extern int len;
extern int *ptr_x, *ptr_y, *ptr_z;
void foo()
{
for (int i = 0; i < len; i++)
ptr_x[i] = ptr_y[i] * ptr_z[i];
}
----------------
The reason for this is LAA (SCEV) is not able to figure out the exit counts.
LV: Can't vectorize due to memory conflicts
LAA: SCEV could not compute the loop exit count.
This test looks trivial and LAA is not able to figure out the loop exit.
This issue is not seen when arrays are used instead of pointers.
==========================================
STEPS to REPRODUCE:
- Download the attached vect.c file
- Run the below command:
clang -O3 -S -emit-llvm -o vect.ll vect.c
==========================================
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs