SLPVectorizer: Change the order in which new instructions are added to the function.
authorNadav Rotem <nrotem@apple.com>
Wed, 22 May 2013 19:47:32 +0000 (19:47 +0000)
committerNadav Rotem <nrotem@apple.com>
Wed, 22 May 2013 19:47:32 +0000 (19:47 +0000)
commit3f75c6cfb575917c8c112b2de9593cb860f79e56
treec90086ea1adb8122e79c7b220703139936e0e6bb
parent23d1d5eb566dbd10a81d9ce2dc67ad1548110b08
SLPVectorizer: Change the order in which new instructions are added to the function.
We are not working on a DAG and I ran into a number of problems when I enabled the vectorizations of 'diamond-trees' (trees that share leafs).
* Imroved the numbering API.
* Changed the placement of new instructions to the last root.
* Fixed a bug with external tree users with non-zero lane.
* Fixed a bug in the placement of in-tree users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182508 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
lib/Transforms/Vectorize/VecUtils.cpp
lib/Transforms/Vectorize/VecUtils.h
test/Transforms/SLPVectorizer/X86/crash_povray.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/in-tree-user.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/multi_user.ll
test/Transforms/SLPVectorizer/X86/ordering.ll [new file with mode: 0644]