[PATCH] D24057: [LoadStoreVectorizer] Change VectorSet to Vector to match head and tail positions. Resolves PR29148.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 14:51:55 PDT 2016
asbirlea created this revision.
asbirlea added reviewers: arsenm, jlebar.
asbirlea added a subscriber: llvm-commits.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: wdng, mzolotukhin.
LSV was using two vector sets (heads and tails) to track pairs of adjiacent position to vectorize.
A recent optimization is trying to obtain the longest chain to vectorize and assumes the positions
in heads(H) and tails(T) match, which is not the case is there are multiple tails for the same head.
i1: store a
i2: store a
i3: store a
T: i2 i3
H: i1 i1
T: i2 i3
So the positions for instructions that follow i3 will have different indexes in H/T.
This patch resolves PR29148.
This issue also surfaced the fact that if the chain is too long, and TLI
returns a "not-fast" answer, the whole chain will be abandoned for
vectorization, even though a smaller one would be beneficial.
Added a testcase and FIXME for this.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5724 bytes
Desc: not available
More information about the llvm-commits