Reapply commit r258404 with fix
authorMatthew Simpson <mssimpso@codeaurora.org>
Wed, 27 Jan 2016 13:43:27 +0000 (13:43 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Wed, 27 Jan 2016 13:43:27 +0000 (13:43 +0000)
commitb95861d35e4c24ce828c4b1e1c9b1470bfeb4111
treee9448698f9919c7c16308eadb2e81b5700d308aa
parent73ae2495e55644f02288c1d2ba5019b8cc1e4fd2
Reapply commit r258404 with fix

This patch is the second attempt to reapply commit r258404. There was bug in
the initial patch and subsequent fix (mentioned below).

The initial patch caused an assertion because we were computing smaller type
sizes for instructions that cannot be demoted. The fix first determines the
instructions that will be demoted, and then applies the smaller type size to
only those instructions.

This should fix PR26239 and PR26307.

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