aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authorVictor Kaplansky <victork@il.ibm.com>2006-08-07 11:28:31 +0000
committerVictor Kaplansky <victork@gcc.gnu.org>2006-08-07 11:28:31 +0000
commit4192d75b251845c010da43f83c5ff6c815159dd4 (patch)
tree2a815da8cd510d65ff313810b7ecb7deddfa81f0 /gcc/tree-vect-analyze.c
parent105d82a07bbdfcaaf4440dcaa33724d7dfefb97c (diff)
downloadgcc-4192d75b251845c010da43f83c5ff6c815159dd4.zip
gcc-4192d75b251845c010da43f83c5ff6c815159dd4.tar.gz
gcc-4192d75b251845c010da43f83c5ff6c815159dd4.tar.bz2
re PR tree-optimization/26969 (ICE with -O1 -funswitch-loops -ftree-vectorize)
ChangeLog PR tree-optimization/26969 * tree-vect-analyze.c (vect_analyze_loop_form): Add check of latch witch an empty list of PHIs. testsuite/Changelog: PR tree-optimizations/26969 * gcc.dg/vect/vect.exp: Compile tests prefixed with "unswitch-loops" with -funswitch-loops. * gcc.dg/vect/unswitch-loops-pr26969.c: New test. From-SVN: r115995
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r--gcc/tree-vect-analyze.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index 9df8ba2..f247cd9 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -1889,7 +1889,8 @@ vect_analyze_loop_form (struct loop *loop)
that the loop is represented as a do-while (with a proper if-guard
before the loop if needed), where the loop header contains all the
executable statements, and the latch is empty. */
- if (!empty_block_p (loop->latch))
+ if (!empty_block_p (loop->latch)
+ || phi_nodes (loop->latch))
{
if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
fprintf (vect_dump, "not vectorized: unexpected loop form.");