diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-05-21 16:27:10 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-05-21 16:27:10 +0200 |
commit | 017a202055c0bdd4529960e6d38992a910649966 (patch) | |
tree | ef603c3763bf4741cdc4256e5c2f1a3e137e2d6c /gcc | |
parent | 27edb974ee6ab6c0be6118835e6a7b395899531a (diff) | |
download | gcc-017a202055c0bdd4529960e6d38992a910649966.zip gcc-017a202055c0bdd4529960e6d38992a910649966.tar.gz gcc-017a202055c0bdd4529960e6d38992a910649966.tar.bz2 |
re PR middle-end/53409 (ICE: vector VEC(vec_void_p,base) index domain error, in vinfo_for_stmt at tree-vectorizer.h:630)
PR tree-optimization/53409
* tree-vect-loop.c (vect_analyze_loop_operations): Don't check
vinfo_for_stmt (op_def_stmt) if op_def_stmt isn't inside loop.
* gcc.c-torture/compile/pr53409.c: New test.
From-SVN: r187716
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr53409.c | 19 | ||||
-rw-r--r-- | gcc/tree-vect-loop.c | 4 |
4 files changed, 29 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c52e9df..080975c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2012-05-21 Jakub Jelinek <jakub@redhat.com> + PR tree-optimization/53409 + * tree-vect-loop.c (vect_analyze_loop_operations): Don't check + vinfo_for_stmt (op_def_stmt) if op_def_stmt isn't inside loop. + PR tree-optimization/53410 * fold-const.c (fold_binary_loc): Use build_zero_cst (type) instead of build_int_cst (type, 0) where vector types might be diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c50ae2f..a9ba222 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2012-05-21 Jakub Jelinek <jakub@redhat.com> + PR tree-optimization/53409 + * gcc.c-torture/compile/pr53409.c: New test. + PR tree-optimization/53410 * gcc.c-torture/compile/pr53410-1.c: New test. * gcc.c-torture/compile/pr53410-2.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53409.c b/gcc/testsuite/gcc.c-torture/compile/pr53409.c new file mode 100644 index 0000000..1bf478e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr53409.c @@ -0,0 +1,19 @@ +/* PR tree-optimization/53409 */ + +int a, c, d, e, f; +int b[0]; + +int +main () +{ + if (f) + e = 0; + int g = d; + for (c = 0; c <= 1; c++) + { + for (a = 0; a <= 1; a = (char) a + 1) + b[c] = g; + a = 0; + } + return 0; +} diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 528788f..305ea7e 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -1327,7 +1327,9 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) return false; op_def_stmt = SSA_NAME_DEF_STMT (phi_op); - if (!op_def_stmt || !vinfo_for_stmt (op_def_stmt)) + if (!op_def_stmt + || !flow_bb_inside_loop_p (loop, gimple_bb (op_def_stmt)) + || !vinfo_for_stmt (op_def_stmt)) return false; if (STMT_VINFO_RELEVANT (vinfo_for_stmt (op_def_stmt)) |