[llvm-commits] [llvm] r170439 - in /llvm/trunk: lib/Transforms/Vectorize/LoopVectorize.cpp test/Transforms/LoopVectorize/reduction.ll

Chris Lattner clattner at apple.com
Tue Dec 18 11:16:51 PST 2012


On Dec 18, 2012, at 11:16 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:

> 
> On 18.12.2012, at 20:13, Chris Lattner <clattner at apple.com> wrote:
> 
>> 
>> On Dec 18, 2012, at 10:40 AM, Benjamin Kramer <benny.kra at googlemail.com> wrote:
>> 
>>> Author: d0k
>>> Date: Tue Dec 18 12:40:20 2012
>>> New Revision: 170439
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=170439&view=rev
>>> Log:
>>> LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops instead of scalar operations.
>> 
>> Cool.  Does this allow target-specific hooks so that (for example) X86 can use haddps?
> 
> The shuffle matching logic in x86 matches some horizontal adds (as seen in my example, phaddw). It's not perfect but I think it could be improved if someone really cares without adding target-specific hooks to the vectorizer.

Even better!

-Chris



More information about the llvm-commits mailing list