Restore flow_bb_inside_loop_p tests (PR 86858)
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 9 Aug 2018 14:45:02 +0000 (14:45 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 9 Aug 2018 14:45:02 +0000 (14:45 +0000)
commit3dec9a89d480616a4c11454f4ef4030d15a49773
treeab3a8afd1b389e9c60c52af8406d314350049cee
parent4beb66421fe0e19d3310c75af3502018119423c6
Restore flow_bb_inside_loop_p tests (PR 86858)

The series to remove vinfo_for_stmt also removed tests of
flow_bb_inside_loop_p if the call was simply testing whether the
statement was in the vectorisation region.  I'd tried to keep calls
that were testing whether the statement was in a particular loop
(inner or outer), but messed up in vect_is_simple_reduction and
removed calls that were actually needed.  This patch restores them.

I double-checked the other removed calls and I think these are
the only ones affected.

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

gcc/
PR tree-optimization/86858
* tree-vect-loop.c (vect_is_simple_reduction): Restore
flow_bb_inside_loop_p calls.

gcc/testsuite/
PR tree-optimization/86858
* gcc.dg/vect/pr86858.c: New test.

From-SVN: r263448
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr86858.c [new file with mode: 0644]
gcc/tree-vect-loop.c