SLPVectorizer: Sort PHINodes based on their opcode
authorArnold Schwaighofer <aschwaighofer@apple.com>
Sat, 12 Oct 2013 18:56:27 +0000 (18:56 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Sat, 12 Oct 2013 18:56:27 +0000 (18:56 +0000)
commit24732c3363a9a442c14cf236c3de1086cdee6000
treebb13ff4e0f982feedf44dc9915df59f86a6ba4a0
parentfe82a3e360fc850e7551f2f1f32b58e539182c68
SLPVectorizer: Sort PHINodes based on their opcode

Before this patch we relied on the order of phi nodes when we looked for phi
nodes of the same type. This could prevent vectorization of cases where there
was a phi node of a second type in between phi nodes of some type.

This is important for vectorization of an internal graphics kernel. On the test
suite + external on x86_64 (and on a run on armv7s) it showed no impact on
either performance or compile time.

radar://15024459

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192537 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/phi.ll