From: Ira Rosen Date: Sun, 16 Oct 2011 13:47:54 +0000 (+0000) Subject: re PR tree-optimization/50727 (ICE with segfault in flow_bb_inside_loop_p) X-Git-Tag: releases/gcc-4.7.0~3066 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aede122782e489f97b367e786ad56487b790a4ee;p=thirdparty%2Fgcc.git re PR tree-optimization/50727 (ICE with segfault in flow_bb_inside_loop_p) PR tree-optimization/50727 * tree-vect-patterns.c (vect_operation_fits_smaller_type): Add DEF_STMT to the list of statements to be replaced by the pattern statements. From-SVN: r180060 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c1098502cedc..cde00698dfc9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-10-16 Ira Rosen + + PR tree-optimization/50727 + * tree-vect-patterns.c (vect_operation_fits_smaller_type): Add + DEF_STMT to the list of statements to be replaced by the + pattern statements. + 2011-10-16 Eric Botcazou PR rtl-optimization/50615 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2461aebec16f..c449d32f91b0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-10-16 Ira Rosen + + PR tree-optimization/50727 + * gcc.dg/vect/pr50727.c: New test. + 2011-10-16 Eric Botcazou * gcc.dg/vla-23.c: New test. diff --git a/gcc/testsuite/gcc.dg/vect/pr50727.c b/gcc/testsuite/gcc.dg/vect/pr50727.c new file mode 100644 index 000000000000..896b614b9b83 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr50727.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ + +typedef unsigned char uint8_t; +typedef unsigned long uint32_t; +void +f0a (uint32_t * __restrict__ result, uint32_t * arg2, + uint8_t * __restrict__ arg4) +{ + int idx; + for (idx = 0; idx < 429; idx += 1) + { + uint32_t temp_9; + uint32_t temp_11; + temp_9 = ((-19 | arg4[idx]) >> arg2[idx]); + temp_11 = (((-19 ^ arg4[idx]) & arg2[idx]) ^ temp_9); + result[idx] = temp_11; + } +} + +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index b43ccc3de59a..da2eb3d9ffe9 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -1003,6 +1003,7 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type, || TREE_TYPE (gimple_assign_lhs (new_stmt)) != interm_type) return false; + VEC_safe_push (gimple, heap, *stmts, def_stmt); oprnd = gimple_assign_lhs (new_stmt); } else