[llvm-bugs] [Bug 38853] New: Not vectorized trivial case since LAA (SCEV) fails to figure out exit counts
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 6 00:04:45 PDT 2018
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: unassignedbugs at nondot.org
Reporter: balarishi.bhogadi at amd.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180906/260ca79e/attachment.html>
More information about the llvm-bugs
mailing list