Fix invalid assumption in vect_transform_stmt (PR 86871)
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 9 Aug 2018 14:37:24 +0000 (14:37 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 9 Aug 2018 14:37:24 +0000 (14:37 +0000)
commit4beb66421fe0e19d3310c75af3502018119423c6
treed29d725c6db8bb82ab3bf4eb09d205680c70ba69
parent16621f0de36074287eca820cd34de79ab8ee3486
Fix invalid assumption in vect_transform_stmt (PR 86871)

The handling of outer-loop uses of inner-loop definitions assumed
that anything that wasn't a PHI would be a gassign.  It's also
possible for it to be a gcall.

2018-08-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR tree-optimization/86871
* tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
instead of gimple_assign_lhs.

gcc/testsuite/
PR tree-optimization/86871
* gcc.dg/vect/pr86871.c: New test.

From-SVN: r263447
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr86871.c [new file with mode: 0644]
gcc/tree-vect-stmts.c