LoopVectorizer: Improve reduction variable identification
authorArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 7 May 2013 21:55:37 +0000 (21:55 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 7 May 2013 21:55:37 +0000 (21:55 +0000)
commit280e1df8585e62f0c801de8e4b625a7e73178d85
treefeb0e6301bebf0284f1d2d0aa79110d117ffecf2
parent88535dda9050377cc52dfffa20664484b0bb9f7f
LoopVectorizer: Improve reduction variable identification

The two nested loops were confusing and also conservative in identifying
reduction variables. This patch replaces them by a worklist based approach.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181369 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/reduction.ll