diff options
author | Alan Hayward <alan.hayward@arm.com> | 2016-06-15 10:53:01 +0000 |
---|---|---|
committer | Alan Hayward <alahay01@gcc.gnu.org> | 2016-06-15 10:53:01 +0000 |
commit | 8f482165c975f0a8410e3c8ecb0c011d409062d9 (patch) | |
tree | eba3649ce4a6b1b60e6d44d00572986dae6a68f2 /gcc/tree-vect-loop.c | |
parent | 3256673f86cb878b41da25db3d4785418d6cf2c9 (diff) | |
download | gcc-8f482165c975f0a8410e3c8ecb0c011d409062d9.zip gcc-8f482165c975f0a8410e3c8ecb0c011d409062d9.tar.gz gcc-8f482165c975f0a8410e3c8ecb0c011d409062d9.tar.bz2 |
re PR tree-optimization/71439 (wrong code at -O3 in 32-bit and 64-bit mode on x86_64-linux-gnu)
2016-06-15 Alan Hayward <alan.hayward@arm.com>
gcc/
PR tree-optimization/71439
* tree-vect-loop.c (vect_analyze_loop_operations): Additional check for
live PHIs.
testsuite/
PR tree-optimization/71439
* gcc.dg/vect/pr71439.c: New
From-SVN: r237476
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 91d0608..4c86785 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -1669,7 +1669,8 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo) gcc_assert (stmt_info); - if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_scope + if ((STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_scope + || STMT_VINFO_LIVE_P (stmt_info)) && STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def) { /* A scalar-dependence cycle that we don't support. */ @@ -1686,6 +1687,9 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo) ok = vectorizable_induction (phi, NULL, NULL); } + if (ok && STMT_VINFO_LIVE_P (stmt_info)) + ok = vectorizable_live_operation (phi, NULL, NULL, -1, NULL); + if (!ok) { if (dump_enabled_p ()) |