From: Alan Hayward Date: Mon, 13 Jun 2016 11:07:35 +0000 (+0000) Subject: re PR tree-optimization/71416 (ICE at -O3 in 32-bit and 64-bit modes on x86_64-linux... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=915794eb26eaafe970c4c9f9d7774b55c4b772b5;p=gcc.git re PR tree-optimization/71416 (ICE at -O3 in 32-bit and 64-bit modes on x86_64-linux-gnu (vectorizable_live_operation)) 2016-06-13 Alan Hayward gcc/ PR tree-optimization/71416 * tree-vect-loop.c (vectorizable_live_operation): Let worklist have multiple entries From-SVN: r237375 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 88506a587eb..e8ad4c85a2d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-06-13 Alan Hayward + + PR tree-optimization/71416 + * tree-vect-loop.c (vectorizable_live_operation): Let worklist have + multiple entries + 2016-06-13 Martin Liska * predict.c (enum predictor_reason): Prefix enum with REASON_. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 1231b95f6a7..91d0608e59c 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -6351,7 +6351,7 @@ vectorizable_live_operation (gimple *stmt, FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs) if (!flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))) worklist.safe_push (use_stmt); - gcc_assert (worklist.length () == 1); + gcc_assert (worklist.length () >= 1); bitsize = TYPE_SIZE (TREE_TYPE (vectype)); vec_bitsize = TYPE_SIZE (vectype); @@ -6409,9 +6409,12 @@ vectorizable_live_operation (gimple *stmt, /* Replace all uses of the USE_STMT in the worklist with the newly inserted statement. */ - use_stmt = worklist.pop (); - replace_uses_by (gimple_phi_result (use_stmt), new_tree); - update_stmt (use_stmt); + while (!worklist.is_empty ()) + { + use_stmt = worklist.pop (); + replace_uses_by (gimple_phi_result (use_stmt), new_tree); + update_stmt (use_stmt); + } return true; }