[llvm-bugs] [Bug 26956] New: [SLP] Missed opportunity to generate min/max reduction for fully unrolled loop
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 15 13:50:58 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=26956
Bug ID: 26956
Summary: [SLP] Missed opportunity to generate min/max reduction
for fully unrolled loop
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: mcrosier at codeaurora.org
CC: anemet at apple.com, hfinkel at anl.gov,
llvm-bugs at lists.llvm.org, mssimpso at codeaurora.org,
nrotem at apple.com
Classification: Unclassified
# define MAX(x,y) ((x)>(y)?(x):(y))
double arr[16];
double bar() {
double max = arr[0];
for (int i = 1; i < 16; ++i)
max = MAX(max, arr[i]);
return max;
}
Given the above code, LLVM currently fully unrolls the loop and the SLP
vectorizer is unable to vectorize the resulting code. If we replace the
constant 16 with an unknown trip count the loop vectorizer will catch this
case.
Please feel free to provide feedback as I'd like to solve this problem, but I
have no experience with the SLP vectorizer.
--
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/20160315/f48d858d/attachment.html>
More information about the llvm-bugs
mailing list