The "getVectorizablePrefix" method would give up if it found an aliasing load for a store chain.
In practice, the aliasing load can be treated as a memory barrier and all stores that precede it
are a valid vectorizable prefix.
Issue found by volkan in D26962. Testcase is a pruned version of the one in the original patch.
Details
Diff Detail
- Build Status
Buildable 1552 Build 1552: arc lint + arc unit
Event Timeline
| lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | ||
|---|---|---|
| 486 | Nit, pls end sentences with periods. | |
| 492–496 | Can we add a comment on this loop to the effect of:
| |
| 531 | As discussed IRL, not sure why we need this early-break at all. | |
| lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | ||
|---|---|---|
| 531 | This a legality condition. It relates to the above comment: We consider loads before stores safe. This patch will somewhat relax this condition, but only for stores. First, store chains: | |
As we discussed, I want to try splitting out this loop into a load and a store version to see if it clarifies things, but I'm happy to do that as a separate patch. This lgtm.
| lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | ||
|---|---|---|
| 535 | I'd either get rid of the second paragraph here or encode it as an assert. | |
Nit, pls end sentences with periods.