SLP vectorizer: Don't hoist vector extracts of phis.
authorAndrew Trick <atrick@apple.com>
Tue, 25 Mar 2014 02:18:47 +0000 (02:18 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 25 Mar 2014 02:18:47 +0000 (02:18 +0000)
commitf5bf687cf7a9941b6d795b9db99a78c64e233b74
tree79ebe96b11640ac7d66fabbb12753434eabe9145
parentb13d54f5880b2dafadd89182ee9adaff11fa9cf3
SLP vectorizer: Don't hoist vector extracts of phis.

Extracts coming from phis were being hoisted, while all others were
sunk to their uses. This was inconsistent and didn't seem to serve a
purpose. Changing all extracts to be sunk to uses is a prerequisite
for adding block frequency to the SLP vectorizer's cost model.

I benchmarked the change in isolation (without block frequency). I
only saw noise on x86 and some potentially significant improvements on
ARM. No major regressions is good enough for me.

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