Reapply commit r259357 with a fix for PR26629
authorMatthew Simpson <mssimpso@codeaurora.org>
Thu, 18 Feb 2016 14:14:40 +0000 (14:14 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Thu, 18 Feb 2016 14:14:40 +0000 (14:14 +0000)
commit92821cb4a883f43f8098408ec4989db8d32f3bb3
tree2ed7dd8a20b6b67ebe2e95d2414784b36b562623
parentf0340214437fe63fd9f134c593a8fda61f231511
Reapply commit r259357 with a fix for PR26629

Commit r259357 was reverted because it caused PR26629. We were assuming all
roots of a vectorizable tree could be truncated to the same width, which is not
the case in general. This commit reapplies the patch along with a fix and a new
test case to ensure we don't regress because of this issue again. This should
fix PR26629.

llvm-svn: 261212
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/gather-reduce.ll
llvm/test/Transforms/SLPVectorizer/AArch64/minimum-sizes.ll