------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-21 14:44 ------- Fixing like the following, but inserting onto the right edge(s) - single_succ_edge actually doesn't work here.
diff -c -3 -p -r2.5 tree-ssa-math-opts.c *** tree-ssa-math-opts.c 9 Aug 2005 03:28:32 -0000 2.5 --- tree-ssa-math-opts.c 21 Sep 2005 14:43:08 -0000 *************** execute_cse_reciprocals_1 (block_stmt_it *** 111,117 **** if (where == PR_BEFORE_BSI) bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT); else if (where == PR_AFTER_BSI) ! bsi_insert_after (bsi, new_stmt, BSI_NEW_STMT); else if (where == PR_ON_ENTRY_EDGE) bsi_insert_on_edge (single_succ_edge (ENTRY_BLOCK_PTR), new_stmt); else --- 111,122 ---- if (where == PR_BEFORE_BSI) bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT); else if (where == PR_AFTER_BSI) ! { ! if (stmt_ends_bb_p (bsi_stmt (*bsi))) ! bsi_insert_on_edge (single_succ_edge (bsi->bb), new_stmt); ! else ! bsi_insert_after (bsi, new_stmt, BSI_NEW_STMT); ! } else if (where == PR_ON_ENTRY_EDGE) bsi_insert_on_edge (single_succ_edge (ENTRY_BLOCK_PTR), new_stmt); else -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948