Add missing VECTOR_MODE_P checks (PR 92595)
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 21 Nov 2019 17:41:16 +0000 (17:41 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 21 Nov 2019 17:41:16 +0000 (17:41 +0000)
commit934f135b967c7501be6e2e10a2c3c03c54a198d3
tree947dab70457f5282f7b8ededd8cd06d8b5493013
parent8239933547870e66ffcc7a664c271a960e3f791a
Add missing VECTOR_MODE_P checks (PR 92595)

This patch fixes some cases in which we weren't checking whether we had
a vector mode before calling related_vector_mode or before making vector
optab queries.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR tree-optimization/92595
* tree-vect-stmts.c (get_group_load_store_type): Add a VECTOR_MODE_P
check.
(vectorizable_store, vectorizable_load): Likewise.

gcc/testsuite/
PR tree-optimization/92595
* g++.dg/vect/pr92595.cc: New test.

From-SVN: r278590
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/vect/pr92595.cc [new file with mode: 0644]
gcc/tree-vect-stmts.c