Reapply "SLPVectorizer: Handle more horizontal reductions (disabled)""
authorArnold Schwaighofer <aschwaighofer@apple.com>
Sat, 21 Sep 2013 01:06:00 +0000 (01:06 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Sat, 21 Sep 2013 01:06:00 +0000 (01:06 +0000)
commita9baf1ecfd343e2d8d8fa277c8b093a1869726bb
tree1942923f038bafac2b41f315fafe94400700ab66
parent2ecd8c90b037e58f4914acfc6a4ced5a01774a05
Reapply "SLPVectorizer: Handle more horizontal reductions (disabled)""

Reapply r191108 with a fix for a memory corruption error I introduced.  Of
course, we can't reference the scalars that we replace by vectorizing and then
call their eraseFromParent method. I only 'needed' the scalars to get the
DebugLoc. Just store the DebugLoc before actually vectorizing instead. As a nice
side effect, this also simplifies the interface between BoUpSLP and the
HorizontalReduction class to returning a value pointer (the vectorized tree
root).

radar://14607682

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191123 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/horizontal.ll [new file with mode: 0644]