public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23588] CCP not fully propagating constants
       [not found] <bug-23588-1@http.gcc.gnu.org/bugzilla/>
@ 2005-10-07 21:21 ` steven at gcc dot gnu dot org
  2006-03-26 18:14 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-10-07 21:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from steven at gcc dot gnu dot org  2005-10-07 21:21 -------
I don't have time to work on these (new job), so unassigning.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|steven at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
       [not found] <bug-23588-1@http.gcc.gnu.org/bugzilla/>
  2005-10-07 21:21 ` [Bug tree-optimization/23588] CCP not fully propagating constants steven at gcc dot gnu dot org
@ 2006-03-26 18:14 ` pinskia at gcc dot gnu dot org
  2006-03-26 18:22 ` pinskia at gcc dot gnu dot org
  2008-03-26 23:48 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-26 18:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-03-26 18:14 -------
Here is another testcase (I don't remember why I was looking into this now but
I was):
int f(int a)
{
  int g = 0;
  int t = a*g*a*a*a*a*a*a*a*a*a*a*a*a*a;

  return t;
}


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
       [not found] <bug-23588-1@http.gcc.gnu.org/bugzilla/>
  2005-10-07 21:21 ` [Bug tree-optimization/23588] CCP not fully propagating constants steven at gcc dot gnu dot org
  2006-03-26 18:14 ` pinskia at gcc dot gnu dot org
@ 2006-03-26 18:22 ` pinskia at gcc dot gnu dot org
  2008-03-26 23:48 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-26 18:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-03-26 18:22 -------
Steven's patch fixes the testcase I gave but it did not fix:
int g1(void) __attribute__((__pure__));
int f(void)
{
  int g = 0;
  int a = g1();
  int t = a*g*a*a*a*a*a*a*a*a*a*a*a*a*a;  
  return t;
}


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
       [not found] <bug-23588-1@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-03-26 18:22 ` pinskia at gcc dot gnu dot org
@ 2008-03-26 23:48 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-26 23:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2008-03-26 23:47 -------
All testcases in this PR are fully optimized by ccp1.  I think Zdenek fixed
this
by properly handling undefined values.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|                            |4.2.3
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
  2005-08-27  3:31 [Bug tree-optimization/23588] New: " dberlin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-09-07 13:36 ` dberlin at dberlin dot org
@ 2005-09-21 15:02 ` steven at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-09-21 15:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-09-21 15:02 -------
Let's fix this. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-08-27 03:31:22         |2005-09-21 15:02:13
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
  2005-08-27  3:31 [Bug tree-optimization/23588] New: " dberlin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-09-07  4:28 ` pinskia at gcc dot gnu dot org
@ 2005-09-07 13:36 ` dberlin at dberlin dot org
  2005-09-21 15:02 ` steven at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: dberlin at dberlin dot org @ 2005-09-07 13:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2005-09-07 13:36 -------
Subject: Re:  CCP not fully propagating
	constants

On Wed, 2005-09-07 at 04:19 +0000, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-07 04:19 -------
> (In reply to comment #3)
> > And then we hit an assert if we change evaluate_stmt to be always call fold_ccp.
> > The assert is in set_lattice_value, when we are changing from VARRYING to CONSTANT which should 
> > be  a valid transition.
> 
> Only if the VARRYING is the default state.
> Before the TCB, this was allowed:
> /* VARYING -> CONSTANT is an invalid state transition, except
>  for objects which start off in a VARYING state.  */
> 

VARYING->CONSTANT should actually never happen, regardless of what the
comment says.

We shouldn't set it to VARYING in the first place if we think it has a
chance of becoming CONSTANT.

So i imagine get_default_value or whatever needs to be more
foregiving :)





-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
  2005-08-27  3:31 [Bug tree-optimization/23588] New: " dberlin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-09-07  3:51 ` pinskia at gcc dot gnu dot org
@ 2005-09-07  4:28 ` pinskia at gcc dot gnu dot org
  2005-09-07 13:36 ` dberlin at dberlin dot org
  2005-09-21 15:02 ` steven at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-07  4:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-07 04:19 -------
(In reply to comment #3)
> And then we hit an assert if we change evaluate_stmt to be always call fold_ccp.
> The assert is in set_lattice_value, when we are changing from VARRYING to CONSTANT which should 
> be  a valid transition.

Only if the VARRYING is the default state.
Before the TCB, this was allowed:
/* VARYING -> CONSTANT is an invalid state transition, except
 for objects which start off in a VARYING state.  */

-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
  2005-08-27  3:31 [Bug tree-optimization/23588] New: " dberlin at gcc dot gnu dot org
  2005-08-27  3:31 ` [Bug tree-optimization/23588] " pinskia at gcc dot gnu dot org
  2005-09-07  3:46 ` pinskia at gcc dot gnu dot org
@ 2005-09-07  3:51 ` pinskia at gcc dot gnu dot org
  2005-09-07  4:28 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-07  3:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-07 03:51 -------
(In reply to comment #2)
> The first thing is that ccp_initialize sets DONT_SIMULATE_AGAIN on the statement so don't simulate 
> that statement and then we don't call fold_ccp on them.

And then we hit an assert if we change evaluate_stmt to be always call fold_ccp.
The assert is in set_lattice_value, when we are changing from VARRYING to CONSTANT which should be 
a valid transition.

-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
  2005-08-27  3:31 [Bug tree-optimization/23588] New: " dberlin at gcc dot gnu dot org
  2005-08-27  3:31 ` [Bug tree-optimization/23588] " pinskia at gcc dot gnu dot org
@ 2005-09-07  3:46 ` pinskia at gcc dot gnu dot org
  2005-09-07  3:51 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-07  3:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-07 03:46 -------
The first thing is that ccp_initialize sets DONT_SIMULATE_AGAIN on the statement so don't simulate 
that statement and then we don't call fold_ccp on them.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/23588] CCP not fully propagating constants
  2005-08-27  3:31 [Bug tree-optimization/23588] New: " dberlin at gcc dot gnu dot org
@ 2005-08-27  3:31 ` pinskia at gcc dot gnu dot org
  2005-09-07  3:46 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-27  3:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-27 03:31 -------
Confirmed.  The same thing happens with s/-1/0/ s/|/&/ .

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-27 03:31:22
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-03-26 23:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23588-1@http.gcc.gnu.org/bugzilla/>
2005-10-07 21:21 ` [Bug tree-optimization/23588] CCP not fully propagating constants steven at gcc dot gnu dot org
2006-03-26 18:14 ` pinskia at gcc dot gnu dot org
2006-03-26 18:22 ` pinskia at gcc dot gnu dot org
2008-03-26 23:48 ` rguenth at gcc dot gnu dot org
2005-08-27  3:31 [Bug tree-optimization/23588] New: " dberlin at gcc dot gnu dot org
2005-08-27  3:31 ` [Bug tree-optimization/23588] " pinskia at gcc dot gnu dot org
2005-09-07  3:46 ` pinskia at gcc dot gnu dot org
2005-09-07  3:51 ` pinskia at gcc dot gnu dot org
2005-09-07  4:28 ` pinskia at gcc dot gnu dot org
2005-09-07 13:36 ` dberlin at dberlin dot org
2005-09-21 15:02 ` steven at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).