LoopVectorizer: Perform redundancy elimination on induction variables
authorArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 1 Nov 2013 22:18:19 +0000 (22:18 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 1 Nov 2013 22:18:19 +0000 (22:18 +0000)
commitf4775827d046aa12f6aaffd5bd4746744e8fdff8
treead74a1bff1264cde016e8dc6c2173d8509ae69df
parent4b1d68bca9e470d06600fed53e4e16251cac31b6
LoopVectorizer: Perform redundancy elimination on induction variables

When the loop vectorizer was part of the SCC inliner pass manager gvn would
run after the loop vectorizer followed by instcombine. This way redundancy
(multiple uses) were removed and instcombine could perform scalarization on the
induction variables. Having moved the loop vectorizer to later we no longer run
any form of redundancy elimination before we perform instcombine. This caused
vectorized induction variables to survive that did not before.

On a recent iMac this helps linpack back from 6000Mflops to 7000Mflops.

This should also help lpbench and paq8p.

I ran a Release (without Asserts) build over the test-suite and did not see any
negative impact on compile time.

radar://15339680

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