[PATCH] Fix PR19657 : SLP vectorization doesn't combine scalar load to vector loads
Karthik Bhat
kv.bhat at samsung.com
Fri May 16 07:40:14 PDT 2014
Hi nadav, hfinkel, aschwaighofer,
Hi Nadav,Hal,Arnold,
This patch fixes PR19657. As Arnold pointed out the reason we miss to vectorize these loads is we are processing the smaller subtree before the larger subtree. This patch calculates the depth of the subtress before calling buildTree_rec and calls the buildTree_rec for the larger subtree before calling it for smaller subtree.
This seems to fix the problem and there are no regressions.
But I'm not sure if there is any easier and more efficient way to check this than actually traversing the subtrees and calculating their depth before we call buildTree_rec. It would be great if you could suggest improvements to this patch.
Thanks
Karthik Bhat
http://reviews.llvm.org/D3800
Files:
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/pr19657.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3800.9479.patch
Type: text/x-patch
Size: 10754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140516/56845ae3/attachment.bin>
More information about the llvm-commits
mailing list