[PATCH] D26962: [LoadStoreVectorizer] Split the chain if the prefix is empty
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 11:58:41 PST 2016
asbirlea added a comment.
The problem you found is real, but this is not the right solution for it.
The issue is in "getVectorizablePrefix". When a load that aliases the store is found, it gives up trying to find a prefix. In reality, all stores that precede the aliasing load (you can view this as a memory barrier) could be safely vectorized.
I'll work on a patch to fix this.
Side note: The testcase you added is fairly large. The problem can be showcased with a much smaller example, along the lines: 4 stores, 4 loads, 4 stores, with the 8 stores forming a chain. "getVectorizablePrefix" should not give up after the first store, but allow all 4 stores that precede the aliasing load to be vectorized.
https://reviews.llvm.org/D26962
More information about the llvm-commits
mailing list