[PATCH] [SLPVectorization] Enhance Ability to Vectorize Horizontal Reductions from Consecutive Loads
suyog
suyog.sarda at samsung.com
Mon Dec 22 00:00:46 PST 2014
Hi Michael,
We could add that check for Left[i+1] and Right[i+1] as well.
If we add that, we would have to increase the loop variable by 2 :)
as we are checking both i and i+1 elements.
By the way, The loop will always run for 2 times only in any case,
since the tree which we are considering, will always have only 2 children for a node.
But, this would be a very strict checking. If we skip this checking,
decision to vectorize or not will be taken by cost model as demonstrated earlier.
The only question is to whether to check at this point itself or leave it for
the cost model to decide, which it does very well.
I am of the opinion that we should not check for Left[i+1] and Right[i+1],
since it would hardly make any difference in the logic and the outcome,
and if we include that check, the code would look a bit ugly :)
Removed redundant braces around isConsecutive check.
Regards,
Suyog
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6675
Files:
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/AArch64/horizontaladd.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6675.17545.patch
Type: text/x-patch
Size: 4713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141222/a9defbb6/attachment.bin>
More information about the llvm-commits
mailing list