]> gcc.gnu.org Git - gcc.git/commit
vect: Fix multi-vector SLP gather loads [PR103744]
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 17 Dec 2021 14:18:39 +0000 (14:18 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Fri, 17 Dec 2021 14:18:39 +0000 (14:18 +0000)
commite781cb93d7d908f1f4f1611d0034eccbd1478e91
treec4fe0953ca4dfa108c4b825fb73123b11e88ce85
parent7dca2ad64910ba4aeae8e1f373f4d4796702b42b
vect: Fix multi-vector SLP gather loads [PR103744]

This PR shows that I didn't properly test the multi-vector case when
adding support for SLP gather loads.  The patch fixes that case using
the same approach as we do for non-SLP cases: keep the scalar base
the same, but iterate through the (also multi-vector) vector offsets.
“vec_num * j + i” is already used elsewhere as a way of handling both
the multi-vector SLP case and the multi-vector non-SLP case.

gcc/
PR tree-optimization/103744
* tree-vect-stmts.c (vectorizable_load): Handle multi-vector
SLP gather loads.

gcc/testsuite/
PR tree-optimization/103744
* gcc.dg/vect/pr103744-1.c: New test.
* gcc.dg/vect/pr103744-2.c: Likewise.
gcc/testsuite/gcc.dg/vect/pr103744-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr103744-2.c [new file with mode: 0644]
gcc/tree-vect-stmts.c
This page took 0.065726 seconds and 5 git commands to generate.