SLPVectorizer: An in-tree vectorized entry cannot also be a scalar external use
authorArnold Schwaighofer <aschwaighofer@apple.com>
Thu, 5 Dec 2013 15:14:40 +0000 (15:14 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Thu, 5 Dec 2013 15:14:40 +0000 (15:14 +0000)
commit9e0807cb617dc6e281a835c9a40e430cc0f8a9cb
tree0a98a841e6011b30f5c32c71ce5562fe6804c938
parent64abf5b441a18c6678853a648ccb59e5a7a39296
SLPVectorizer: An in-tree vectorized entry cannot also be a scalar external use

We were creating external uses for scalar values in MustGather entries that also
had a ScalarToTreeEntry (they also are present in a vectorized tuple). This
meant we would keep a value 'alive' as a scalar and vectorized causing havoc.
This is not necessary because when we create a MustGather vector we explicitly
create external uses entries for the insertelement instructions of the
MustGather vector elements.

Fixes PR18129.

radar://15582184

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