[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2006-01-22 Thread pinskia at gcc dot gnu dot org


--- Comment #25 from pinskia at gcc dot gnu dot org  2006-01-23 01:26 
---
*** Bug 25909 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dawid dot ciezarkiewicz at
   ||gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948



[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2006-01-11 Thread bonzini at gnu dot org


--- Comment #24 from bonzini at gnu dot org  2006-01-11 14:31 ---
patch committed


-- 

bonzini at gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948




[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2006-01-11 Thread bonzini at gcc dot gnu dot org


--- Comment #23 from bonzini at gnu dot org  2006-01-11 14:29 ---
Subject: Bug 23948

Author: bonzini
Date: Wed Jan 11 14:29:29 2006
New Revision: 109586

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109586
Log:
gcc:
2006-01-11  Paolo Bonzini  <[EMAIL PROTECTED]>

PR tree-optimization/23109
PR tree-optimization/23948
PR tree-optimization/24123

* Makefile.in (tree-ssa-math-opts.o): Adjust dependencies.
* tree-cfg.c (single_noncomplex_succ): New.
* tree-flow.h (single_noncomplex_succ): Declare it.
* tree-ssa-math-opts.c (enum place_reciprocal): Remove.
* tree-ssa-math-opts.c (enum place_reciprocal): Remove.
(struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit,
insert_bb, register_division_in, insert_reciprocals,
replace_reciprocal, free_bb): New.
(execute_cse_reciprocals_1): Rewritten.
(execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1.
Do not commit any edge insertion.  Always compute dominators and
create the allocation pool.
* target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New.
* target.h (struct gcc_target): Add min_divistions_for_recip_mul.
* targhooks.c (default_min_divistions_for_recip_mul): New.
* targhooks.h (default_min_divistions_for_recip_mul): New prototype.
* passes.c (init_optimization_passes): Run recip after tree loop
optimizations.
* doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.

gcc/testsuite:
2006-01-11  Paolo Bonzini  <[EMAIL PROTECTED]>

PR tree-optimization/23109
PR tree-optimization/23948
PR tree-optimization/24123

* gcc.dg/tree-ssa/recip-3.c, gcc.dg/tree-ssa/recip-4.c,
gcc.dg/tree-ssa/recip-5.c, gcc.dg/tree-ssa/recip-6.c,
gcc.dg/tree-ssa/recip-7.c, gcc.dg/tree-ssa/pr23109.c,
g++.dg/tree-ssa/pr23948.C: New testcases.
* gcc.dg/tree-ssa/recip-2.c, gcc.dg/tree-ssa/pr23234.c: Provide
three divisions in order to do the optimization.


Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr23948.C
  - copied unchanged from r109578,
trunk/gcc/testsuite/g++.dg/tree-ssa/pr23948.C
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
  - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
  - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-4.c
  - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-4.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
  - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-6.c
  - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-6.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-7.c
  - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-7.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/Makefile.in
branches/gcc-4_1-branch/gcc/doc/tm.texi
branches/gcc-4_1-branch/gcc/passes.c
branches/gcc-4_1-branch/gcc/target-def.h
branches/gcc-4_1-branch/gcc/target.h
branches/gcc-4_1-branch/gcc/targhooks.c
branches/gcc-4_1-branch/gcc/targhooks.h
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr23234.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-2.c
branches/gcc-4_1-branch/gcc/tree-cfg.c
branches/gcc-4_1-branch/gcc/tree-flow.h
branches/gcc-4_1-branch/gcc/tree-ssa-math-opts.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948




[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-10-30 Thread mmitchel at gcc dot gnu dot org


--- Comment #20 from mmitchel at gcc dot gnu dot org  2005-10-31 05:48 
---
This is a showstopper.


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P2  |P1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948



[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-10-15 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948



[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-10-15 Thread steven at gcc dot gnu dot org


--- Comment #19 from steven at gcc dot gnu dot org  2005-10-15 17:27 ---
argh


-- 

steven at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|DUPLICATE   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948



[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-10-15 Thread steven at gcc dot gnu dot org


--- Comment #18 from steven at gcc dot gnu dot org  2005-10-15 17:26 ---
...to fix a mouse click on the wrong radio button :-)

*** This bug has been marked as a duplicate of 24232 ***


-- 

steven at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948



[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-25 Thread bonzini at gcc dot gnu dot org

--- Additional Comments From bonzini at gcc dot gnu dot org  2005-09-25 
12:48 ---
Posted the patch for the algorithm I had sketched in the previous comments.

-- 
   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2005-
   ||09/msg01555.html


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-23 Thread bonzini at gcc dot gnu dot org

--- Additional Comments From bonzini at gcc dot gnu dot org  2005-09-23 
09:58 ---
I've rewritten execute_cse_reciprocals, I think the only useful solution is to
implement the optimal scheme for inserting reciprocals, and fix this bug in the
process.

My algorithm builds a "mock" dominator tree including only the basic blocks with
the divides and their common dominators, and then inserts divides whenever it is
necessary to satisfy these conditions:

1) if -ftrapping-math, the basic block must have one divide

2) in addition, at least two divides must either be in the basic block, or
postdominate it.

I still have to run some coverage tests, then I'll post the patch.  If anybody
wants to help, I'd be thankful.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-22 Thread bonzini at gcc dot gnu dot org

--- Additional Comments From bonzini at gcc dot gnu dot org  2005-09-22 
07:09 ---
I have a patch but it only works in the -fno-trapping-math case.  Given that
trapping math is much more complex, that the code quality improves for
-ftrapping-math, and that we are late in the development of 4.1, I'll probably
punt and disable the optimization for -ftrapping-math.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-22 Thread bonzini at gcc dot gnu dot org

--- Additional Comments From bonzini at gcc dot gnu dot org  2005-09-22 
07:00 ---
I don't know the tree-cfg bits very well, but the patch seems wrong; you are not
committing the edge insertion.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-21 Thread rguenth at gcc dot gnu dot org

--- 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.c9 Aug 2005 03:28:32 -   2.5
--- tree-ssa-math-opts.c21 Sep 2005 14:43:08 -
*** 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


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-21 Thread paolo dot bonzini at lu dot unisi dot ch

--- Additional Comments From paolo dot bonzini at lu dot unisi dot ch  
2005-09-21 14:33 ---
Subject: Re:  [4.1 Regression] internal compiler
 error: verify_stmts failed

rguenth at gcc dot gnu dot org wrote:

>--- Additional Comments From rguenth at gcc dot gnu dot org  2005-09-21 
>14:18 ---
>We insert the reciprocal computation correctly after the call to 
>  double prrs = potentially_runnable_resource_share();
>but as this call may trap and is the last instruction in the basic block,
>inserting there is obviously bogous.
>
>We'd need to insert a new BB or need a way to insert on the EXIT_EDGE.  And
>make sure critical edges are split.
>  
>
No, I think we have to rethink the place where we insert the division.  
It needs to be closer to the divide (just before), not right after the 
definition.  When we have flag_trapping_math, this is quite hard to do 
(there may be even multiple places to insert the divide!).

I also did not understand why you had to fiddle with postdominators :-) 
to fix PR23309.  I have a prototype patch but it will probably be a 
while before I can sit, look if it really works, and test it properly.

Paolo


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-21 Thread rguenth at gcc dot gnu dot org

--- Additional Comments From rguenth at gcc dot gnu dot org  2005-09-21 
14:18 ---
We insert the reciprocal computation correctly after the call to 
  double prrs = potentially_runnable_resource_share();
but as this call may trap and is the last instruction in the basic block,
inserting there is obviously bogous.

We'd need to insert a new BB or need a way to insert on the EXIT_EDGE.  And
make sure critical edges are split.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-21 Thread bonzini at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |bonzini at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-09-18 18:54:12 |2005-09-21 08:12:59
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-20 Thread janis187 at us dot ibm dot com

--- Additional Comments From janis187 at us dot ibm dot com  2005-09-20 
21:28 ---
The ICE begins with these patches (the second adds a missing file for the first)
from bonzini:

  http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00791.html
  http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00792.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-18 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-18 
18:54 ---
Reduced testcase:
struct MIOFILE {
  ~MIOFILE();
};
double potentially_runnable_resource_share();
void f1(double);
int make_scheduler_request(double a)
{
  MIOFILE mf;
  double prrs = potentially_runnable_resource_share();
  f1(a/prrs);
  f1(1/prrs);
}

---

-O1 -ffast-math is enough to reproduce this reduced testcase.
This is caused by the recip pass.

-- 
   What|Removed |Added

 CC||bonzini at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
  GCC build triplet|x86_64-linux-gnu|
   GCC host triplet|x86_64-linux-gnu|
 GCC target triplet|x86_64-linux-gnu|
   Last reconfirmed|-00-00 00:00:00 |2005-09-18 18:54:12
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948


[Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed

2005-09-18 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-18 
18:16 ---
-O2 -finline-functions -ffast-math is enough to reproduce this.

-- 
   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org, hubicka at gcc dot gnu
   ||dot org
  Component|c++ |tree-optimization
Summary|internal compiler error:|[4.1 Regression] internal
   |verify_stmts failed |compiler error: verify_stmts
   ||failed
   Target Milestone|--- |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948