Fix PR19657 (scalar loads not combined into vector load)
authorKarthik Bhat <kv.bhat@samsung.com>
Fri, 6 Jun 2014 06:20:08 +0000 (06:20 +0000)
committerKarthik Bhat <kv.bhat@samsung.com>
Fri, 6 Jun 2014 06:20:08 +0000 (06:20 +0000)
commitbf56d44cab281a7cec42c6c01caac8e7e7b3ea5c
tree15c9a47ff90243fadf3f58d051e92f36c2fd0ef6
parent5627ee47f4ff8efceb6297f7542fd05e4bb0c2ba
Fix PR19657 (scalar loads not combined into vector load)
If we have common uses on separate paths in the tree; process the one with greater common depth first.
This makes sure that we do not assume we need to extract a load when it is actually going to be part of a vectorized tree.

Review: http://reviews.llvm.org/D3800
llvm-svn: 210310
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/pr19657.ll [new file with mode: 0644]