Re: vectorizer: Avoid an OOB access from vectorization

2023-07-25 Thread Richard Sandiford via Gcc-patches
Was leaving a bit of time in case Richi had any comments, but: Matthew Malcomson writes: > Our checks for whether the vectorization of a given loop would make an > out of bounds access miss the case when the vector we load is so large > as to span multiple iterations worth of data (while only bei

Re: vectorizer: Avoid an OOB access from vectorization

2023-07-19 Thread Richard Biener via Gcc-patches
On Tue, 18 Jul 2023, Matthew Malcomson wrote: > Tamar pointed out it would be good to have a `scan-tree-dump` in the testcase > just to make sure that when something is currently vectorizing it stays > vectorizing (and hence that the new code is still likely running). > > Attached patch has that

Re: vectorizer: Avoid an OOB access from vectorization

2023-07-18 Thread Matthew Malcomson via Gcc-patches
Tamar pointed out it would be good to have a `scan-tree-dump` in the testcase just to make sure that when something is currently vectorizing it stays vectorizing (and hence that the new code is still likely running). Attached patch has that change, also inlined for ease of reply.

vectorizer: Avoid an OOB access from vectorization

2023-07-14 Thread Matthew Malcomson via Gcc-patches
Our checks for whether the vectorization of a given loop would make an out of bounds access miss the case when the vector we load is so large as to span multiple iterations worth of data (while only being there to implement a single iteration). This patch adds a check for such an access. Example