[llvm-bugs] [Bug 36481] New: Reassociation messes up SLPVectorizer reduction
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 22 15:41:18 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36481
Bug ID: 36481
Summary: Reassociation messes up SLPVectorizer reduction
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: timshen91 at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19931
--> https://bugs.llvm.org/attachment.cgi?id=19931&action=edit
Test
Running `opt -S -slp-vectorizer $TEST_FILE`, the function gets SLP-vectorized;
Running `opt -S -reassociate -slp-vectorizer $TEST_FILE`, the function doesn't
get SLP-vectorized.
This is because the reassociation pass re-associates instructions like `acc =
add ith_element, acc` to `acc = add acc, ith_element`, but didn't re-assocate
the first instruction `acc = add first_element, second_element` to `acc = add
second_element, first_element`.
However, as add is associative, a smarter SLP vectorizer could have ignored the
associations and vectorize the unordered adds anyway.
I'm not sure where to put the fix on.
--
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/20180222/7a98d228/attachment.html>
More information about the llvm-bugs
mailing list