summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Hello
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2015-08-27 14:12:17 +0000
committerChad Rosier <mcrosier@codeaurora.org>2015-08-27 14:12:17 +0000
commitc94f8e2906e7a7f3672e8506010c2d42b31dfa79 (patch)
treebd36232820e7fb1457258250274779dd3cb193fa /llvm/lib/Transforms/Hello
parent8ea893a57acdcb670c162414b485e6d42f2b3a67 (diff)
downloadbcm5719-llvm-c94f8e2906e7a7f3672e8506010c2d42b31dfa79.tar.gz
bcm5719-llvm-c94f8e2906e7a7f3672e8506010c2d42b31dfa79.zip
[LoopVectorize] Add Support for Small Size Reductions.
Unlike scalar operations, we can perform vector operations on element types that are smaller than the native integer types. We type-promote scalar operations if they are smaller than a native type (e.g., i8 arithmetic is promoted to i32 arithmetic on Arm targets). This patch detects and removes type-promotions within the reduction detection framework, enabling the vectorization of small size reductions. In the legality phase, we look through the ANDs and extensions that InstCombine creates during promotion, keeping track of the smaller type. In the profitability phase, we use the smaller type and ignore the ANDs and extensions in the cost model. Finally, in the code generation phase, we truncate the result of the reduction to allow InstCombine to rewrite the entire expression in the smaller type. This fixes PR21369. http://reviews.llvm.org/D12202 Patch by Matt Simpson <mssimpso@codeaurora.org>! llvm-svn: 246149
Diffstat (limited to 'llvm/lib/Transforms/Hello')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud