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

Duncan Sands baldrick at free.fr
Fri Apr 19 08:29:49 PDT 2013


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.



More information about the llvm-commits mailing list