[Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Aug 7 15:52:00 GMT 2005
------- Additional Comments From steven at gcc dot gnu dot org 2005-08-07 15:52 -------
Index: tree-ssa-math-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-math-opts.c,v
retrieving revision 2.4
diff -u -p -r2.4 tree-ssa-math-opts.c
--- tree-ssa-math-opts.c 1 Aug 2005 08:58:25 -0000 2.4
+++ tree-ssa-math-opts.c 7 Aug 2005 15:52:07 -0000
@@ -56,14 +56,15 @@ gate_cse_reciprocals (void)
/* Check if DEF's uses include more than one floating-point division,
and if so replace them by multiplications with the reciprocal. If
- PHI is true, insert the reciprocal calculation before BSI, otherwise
- insert it after and move BSI to the new statement.
+ BEFORE_BSI is true, insert the reciprocal calculation before BSI,
+ otherwise insert it after and move BSI to the new statement.
Does not check the type of DEF, nor that DEF is a GIMPLE register.
This is done in the caller for speed, because otherwise this routine
would be called for every definition and phi node. */
static void
-execute_cse_reciprocals_1 (block_stmt_iterator *bsi, tree def, bool phi)
+execute_cse_reciprocals_1 (block_stmt_iterator *bsi,
+ tree def, bool before_bsi)
{
use_operand_p use_p;
imm_use_iterator use_iter;
@@ -99,7 +100,7 @@ execute_cse_reciprocals_1 (block_stmt_it
fold_build2 (RDIV_EXPR, type, build_real (type, dconst1),
def));
- if (phi)
+ if (before_bsi)
bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT);
else
bsi_insert_after (bsi, new_stmt, BSI_NEW_STMT);
@@ -133,7 +134,7 @@ execute_cse_reciprocals (void)
{
block_stmt_iterator bsi;
bsi = bsi_start (single_succ (ENTRY_BLOCK_PTR));
- execute_cse_reciprocals_1 (&bsi, default_def (arg), false);
+ execute_cse_reciprocals_1 (&bsi, default_def (arg), true);
}
FOR_EACH_BB (bb)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
More information about the Gcc-bugs
mailing list