[llvm] r179773 - LoopVectorizer: Recognize min/max reductions

Arnold Schwaighofer aschwaighofer at apple.com
Fri Apr 19 14:06:05 PDT 2013


r179886

On Apr 19, 2013, at 10:29 AM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Arnold,
> 
> On 18/04/13 19:22, Arnold Schwaighofer wrote:
>> Author: arnolds
>> Date: Thu Apr 18 12:22:34 2013
>> New Revision: 179773
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=179773&view=rev
>> Log:
>> LoopVectorizer: Recognize min/max reductions
>> 
>> A min/max operation is represented by a select(cmp(lt/le/gt/ge, X, Y), X, Y)
>> sequence in LLVM. If we see such a sequence we can treat it just as any other
>> commutative binary instruction and reduce it.
>> 
>> This appears to help bzip2 by about 1.5% on an imac12,2.
>> 
>> radar://12960601
> 
> llvm/Support/PatternMatch.h can recognize max/min idioms.  Maybe you could use
> that here?
> 
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list