OSDN Git Service

[LV] Relax Small Size Reduction Type Requirement
authorMatthew Simpson <mssimpso@codeaurora.org>
Thu, 10 Sep 2015 21:12:57 +0000 (21:12 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Thu, 10 Sep 2015 21:12:57 +0000 (21:12 +0000)
commit19991cc69a011299075aa6914d28f0827dbc635b
tree73406b1ececaf9392627f773db1f062d92eb4ed1
parentb56b4c0b45bd6ad06944597e67e0d9d1358d1762
[LV] Relax Small Size Reduction Type Requirement

This patch enables small size reductions in which the source types are smaller
than the reduction type (e.g., computing an i16 sum from the values in an i8
array). The previous behavior was to only allow small size reductions if the
source types and reduction type were the same. The change accounts for the fact
that the existing sign- and zero-extend instructions in these cases should
still be included in the cost model.

Differential Revision: http://reviews.llvm.org/D12770

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247337 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUtils.cpp
test/Transforms/LoopVectorize/AArch64/reduction-small-size.ll