[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)
commit6c15862fd32a272b9ab1833de2cc8858e9036388
tree11690f667aa610992e26f6fad9415c17b5862bb9
parent9819bcf7f1a3d985fc1283e76280d8d730854f9d
[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).

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