vect: ICE: in vectorizable_load, at tree-vect-stmts.c:9173 [PR94398]
authorFelix Yang <felix.yang@huawei.com>
Tue, 31 Mar 2020 08:41:56 +0000 (16:41 +0800)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 31 Mar 2020 14:13:33 +0000 (15:13 +0100)
commitf14b41d27124601284347a10d496362c8b4b8e1c
tree810880a1322035d19afa7e22558d46540596e383
parente06cde870edc7ec21736145b6857565d4b2f0e85
vect: ICE: in vectorizable_load, at tree-vect-stmts.c:9173 [PR94398]

In the testcase for PR94398, we're trying to compute:

  alignment_support_scheme
    = vect_supportable_dr_alignment (first_dr_info, false);
  gcc_assert (alignment_support_scheme);

even for VMAT_GATHER_SCATTER, which always accesses individual elements.
Here we should set alignment_support_scheme to dr_unaligned_supported
the gather/scatter case instead of calling vect_supportable_dr_alignment.

2020-03-31  Felix Yang  <felix.yang@huawei.com>

gcc/
PR tree-optimization/94398
* tree-vect-stmts.c (vectorizable_store): Instead of calling
vect_supportable_dr_alignment, set alignment_support_scheme to
dr_unaligned_supported for gather-scatter accesses.
(vectorizable_load): Likewise.

gcc/testsuite/
PR tree-optimization/94398
* gcc.target/aarch64/pr94398.c: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/pr94398.c [new file with mode: 0644]
gcc/tree-vect-stmts.c