[SLPVectorize] Basic ephemeral-value awareness
authorHal Finkel <hfinkel@anl.gov>
Wed, 15 Oct 2014 17:35:01 +0000 (17:35 +0000)
committerHal Finkel <hfinkel@anl.gov>
Wed, 15 Oct 2014 17:35:01 +0000 (17:35 +0000)
commit3b7fc86677aa17fa00ada1db6e33e6e81948b3dc
tree40c03e4494bab4917241a6c4985335d53e534653
parent8683d2b0d2deb319d15438d052fe9b6a07f8e65a
[SLPVectorize] Basic ephemeral-value awareness

The SLP vectorizer should not vectorize ephemeral values. These are used to
express information to the optimizer, and vectorizing them does not lead to
faster code (because the ephemeral values are dropped prior to code generation,
vectorized or not), and obscures the information the instructions are
attempting to communicate (the logic that interprets the arguments to
@llvm.assume generically does not understand vectorized conditions).

Also, uses by ephemeral values are free (because they, and the necessary
extractelement instructions, will be dropped prior to code generation).

llvm-svn: 219816
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll