public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/15784] New: fold misses bitwise optimization
@ 2004-06-02 20:45 pinskia at gcc dot gnu dot org
  2004-06-02 21:14 ` [Bug tree-optimization/15784] fold misses binary optimization pinskia at gcc dot gnu dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 20:45 UTC (permalink / raw)
  To: gcc-bugs

int f(int x)
{
  return x & ~x;  // should be 0 before getting to the RTL level
}
int h(int x)
{
  return x | ~x; // should be -1 before getting to the RTL level
}

-- 
           Summary: fold misses bitwise optimization
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, TREE
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
@ 2004-06-02 21:14 ` pinskia at gcc dot gnu dot org
  2004-06-02 21:22 ` pinskia at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 21:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|fold misses bitwise         |fold misses binary
                   |optimization                |optimization


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
  2004-06-02 21:14 ` [Bug tree-optimization/15784] fold misses binary optimization pinskia at gcc dot gnu dot org
@ 2004-06-02 21:22 ` pinskia at gcc dot gnu dot org
  2004-06-02 21:24 ` pinskia at gcc dot gnu dot org
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 21:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 21:22 -------
int f(int x)
{
  return  ~x + 1; // -x
}

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
  2004-06-02 21:14 ` [Bug tree-optimization/15784] fold misses binary optimization pinskia at gcc dot gnu dot org
  2004-06-02 21:22 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 21:24 ` pinskia at gcc dot gnu dot org
  2004-06-02 21:25 ` pinskia at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 21:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 21:24 -------
int f(int x)
{
  return -1 - x; // ~a
}

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-06-02 21:24 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 21:25 ` pinskia at gcc dot gnu dot org
  2004-06-02 21:26 ` pinskia at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 21:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 21:25 -------
int f(int x)
{
  return x*9 - x; // x*8
}

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-06-02 21:25 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 21:26 ` pinskia at gcc dot gnu dot org
  2004-06-02 22:23 ` pinskia at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 21:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 21:26 -------
int f(int x)
{
  return -x - 9; // -9 - x
}

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-06-02 21:26 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 22:23 ` pinskia at gcc dot gnu dot org
  2004-06-02 22:39 ` pinskia at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 22:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 22:23 -------
int f(int x, int y)
{
  return 0/x; // 0
}
int g(int x, int y)
{
  return 0%x; // 0
}

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-06-02 22:23 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 22:39 ` pinskia at gcc dot gnu dot org
  2004-06-03  0:31 ` pinskia at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 22:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 22:39 -------
int f(int x, int y)
{
  return x - y - x; // -y
}

#define abs(x) x>0?x:-x
int f(int x, int y)
{
  return (abs(x)) >= 0; //1
}

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-06-02 22:39 ` pinskia at gcc dot gnu dot org
@ 2004-06-03  0:31 ` pinskia at gcc dot gnu dot org
  2004-06-26 20:27 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-03  0:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-03 00:31 -------
#define abs(x) x>0?x:-x
int f(int x, int y)
{
  return (abs(x)) == 0;
}


-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-06-03  0:31 ` pinskia at gcc dot gnu dot org
@ 2004-06-26 20:27 ` pinskia at gcc dot gnu dot org
  2004-06-27 17:36 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-26 20:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-26 20:22 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-26 20:22:52
               date|                            |


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-06-26 20:27 ` pinskia at gcc dot gnu dot org
@ 2004-06-27 17:36 ` pinskia at gcc dot gnu dot org
  2004-07-04  7:43 ` kazu at cs dot umass dot edu
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-27 17:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-27 17:25 -------
Note the ones in Comment #0, are fixed by: <http://gcc.gnu.org/ml/gcc-patches/2004-06/
msg02250.html>.

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-06-27 17:36 ` pinskia at gcc dot gnu dot org
@ 2004-07-04  7:43 ` kazu at cs dot umass dot edu
  2004-07-04  7:49 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-07-04  7:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2004-07-04 07:43 -------
Strictly speaking, Comments #6 and #7 do not qualify for "TREE" keyword.


-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2004-07-04  7:43 ` kazu at cs dot umass dot edu
@ 2004-07-04  7:49 ` pinskia at gcc dot gnu dot org
  2004-07-04  8:01 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-04  7:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-04 07:49 -------
Actually they do on PowerPC.

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2004-07-04  7:49 ` pinskia at gcc dot gnu dot org
@ 2004-07-04  8:01 ` pinskia at gcc dot gnu dot org
  2005-02-11 14:19 ` phython at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-04  8:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-04 08:01 -------
oh, here is why the last two happen on PowerPC and not on i?86, there is an abs pattern for POWER so 
we (rs6000) have to a split for the abs so the large number of optimizations can happen before we get 
to the point which we split the insn.  On i686, it is split/expanded right during expand instead of 
waiting until after reload which is what is done on PowerPC.

Also I got all of these by looking into the simplify-rtx.c file so this should be nothing different from 
there.

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2004-07-04  8:01 ` pinskia at gcc dot gnu dot org
@ 2005-02-11 14:19 ` phython at gcc dot gnu dot org
  2005-02-13 18:30 ` cvs-commit at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-02-11 14:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phython at gcc dot gnu dot org  2005-02-11 05:48 -------
Created an attachment (id=8172)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8172&action=view)
not/negate folding testcase


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


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2005-02-11 14:19 ` phython at gcc dot gnu dot org
@ 2005-02-13 18:30 ` cvs-commit at gcc dot gnu dot org
  2005-02-16 12:41 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-13 18:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-13 06:21 -------
Subject: Bug 15784

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	phython@gcc.gnu.org	2005-02-13 06:21:36

Modified files:
	gcc            : ChangeLog fold-const.c 

Log message:
	2005-02-13  James A. Morrison  <phython@gcc.gnu.org>
	
	PR tree-optimization/14303
	PR tree-optimization/15784
	* fold-const.c (fold): Fold ABS_EXPR<x> >= 0 to true, when possible.
	Fold ABS_EXPR<x> < 0 to false.  Fold ABS_EXPR<x> == 0 to x == 0 and
	ABS_EXPR<x> != 0 to x != 0.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7460&r2=2.7461
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.506&r2=1.507



-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2005-02-13 18:30 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-16 12:41 ` pinskia at gcc dot gnu dot org
  2005-03-04  2:49 ` cvs-commit at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-16 12:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-16 05:38 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00905.html>.  Thanks James for 
looking into this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2005-02-16 12:41 ` pinskia at gcc dot gnu dot org
@ 2005-03-04  2:49 ` cvs-commit at gcc dot gnu dot org
  2005-03-04  2:55 ` phython at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-04  2:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-04 02:49 -------
Subject: Bug 15784

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	phython@gcc.gnu.org	2005-03-04 02:48:32

Modified files:
	gcc            : ChangeLog fold-const.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr15784-4.c 

Log message:
	2005-03-03  James A. Morrison  <phython@gcc.gnu.org>
	
	PR tree-optimization/15784
	* fold-const.c (fold): Fold ~A + 1 to -1.  Fold -A - 1
	and -1 - A to ~A.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7657&r2=2.7658
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.520&r2=1.521
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5106&r2=1.5107
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr15784-4.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2005-03-04  2:49 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-04  2:55 ` phython at gcc dot gnu dot org
  2005-03-04  3:27 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-03-04  2:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phython at gcc dot gnu dot org  2005-03-04 02:55 -------
The binary conditions below are all folded now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Version|4.0.0                       |4.1.0


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2005-03-04  2:55 ` phython at gcc dot gnu dot org
@ 2005-03-04  3:27 ` pinskia at gcc dot gnu dot org
  2005-03-04  6:24 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-04  3:27 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0
            Version|4.1.0                       |4.0.0


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2005-03-04  3:27 ` pinskia at gcc dot gnu dot org
@ 2005-03-04  6:24 ` cvs-commit at gcc dot gnu dot org
  2005-03-04  6:26 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-04  6:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-04 06:24 -------
Subject: Bug 15784

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2005-03-04 06:24:12

Modified files:
	gcc            : ChangeLog fold-const.c 

Log message:
	2005-03-04  Andrew Pinski  <pinskia@physics.uc.edu>
	
	Revert for now:
	2005-03-03  James A. Morrison  <phython@gcc.gnu.org>
	PR tree-optimization/15784
	* fold-const.c (fold): Fold ~A + 1 to -1.  Fold -A - 1
	and -1 - A to ~A.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7662&r2=2.7663
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.522&r2=1.523



-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2005-03-04  6:24 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-04  6:26 ` pinskia at gcc dot gnu dot org
  2005-03-08  0:21 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-04  6:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-04 06:26 -------
Reopening as this patch had to reverted as it caused a bootstrap failure on ppc-darwin.  I think there 
really is a latent bug with -1 - A being converted to ~A and then ~A is constant folded to -1 but it 
contains a TREE_OVERFLOW bit turned on which it did not with -1 - A before.  (there might be some 
unsignedness going on that I don't know about).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2005-03-04  6:26 ` pinskia at gcc dot gnu dot org
@ 2005-03-08  0:21 ` steven at gcc dot gnu dot org
  2005-03-11  4:53 ` cvs-commit at gcc dot gnu dot org
  2005-03-11  5:03 ` phython at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-03-08  0:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-03-08 00:21 -------
More on the latent bug that the patch for this PR uncovers: 
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00448.html 

-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (21 preceding siblings ...)
  2005-03-08  0:21 ` steven at gcc dot gnu dot org
@ 2005-03-11  4:53 ` cvs-commit at gcc dot gnu dot org
  2005-03-11  5:03 ` phython at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-11  4:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-11 04:52 -------
Subject: Bug 15784

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	law@gcc.gnu.org	2005-03-11 04:52:44

Modified files:
	gcc            : ChangeLog fold-const.c stmt.c 

Log message:
	PR tree-optimization/15784
	* fold-const.c (fold): Fold ~A + 1 to -A.  Fold -A - 1
	and -1 - A to ~A.
	
	* stmt.c (expand_case): Don't change index_type.  Convert minval
	to the proper type.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7782&r2=2.7783
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.540&r2=1.541
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stmt.c.diff?cvsroot=gcc&r1=1.417&r2=1.418



-- 


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


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

* [Bug tree-optimization/15784] fold misses binary optimization
  2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
                   ` (22 preceding siblings ...)
  2005-03-11  4:53 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-11  5:03 ` phython at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-03-11  5:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phython at gcc dot gnu dot org  2005-03-11 05:03 -------
 Jeff Law rechecked in the patch for this bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2005-03-11  5:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-02 20:45 [Bug tree-optimization/15784] New: fold misses bitwise optimization pinskia at gcc dot gnu dot org
2004-06-02 21:14 ` [Bug tree-optimization/15784] fold misses binary optimization pinskia at gcc dot gnu dot org
2004-06-02 21:22 ` pinskia at gcc dot gnu dot org
2004-06-02 21:24 ` pinskia at gcc dot gnu dot org
2004-06-02 21:25 ` pinskia at gcc dot gnu dot org
2004-06-02 21:26 ` pinskia at gcc dot gnu dot org
2004-06-02 22:23 ` pinskia at gcc dot gnu dot org
2004-06-02 22:39 ` pinskia at gcc dot gnu dot org
2004-06-03  0:31 ` pinskia at gcc dot gnu dot org
2004-06-26 20:27 ` pinskia at gcc dot gnu dot org
2004-06-27 17:36 ` pinskia at gcc dot gnu dot org
2004-07-04  7:43 ` kazu at cs dot umass dot edu
2004-07-04  7:49 ` pinskia at gcc dot gnu dot org
2004-07-04  8:01 ` pinskia at gcc dot gnu dot org
2005-02-11 14:19 ` phython at gcc dot gnu dot org
2005-02-13 18:30 ` cvs-commit at gcc dot gnu dot org
2005-02-16 12:41 ` pinskia at gcc dot gnu dot org
2005-03-04  2:49 ` cvs-commit at gcc dot gnu dot org
2005-03-04  2:55 ` phython at gcc dot gnu dot org
2005-03-04  3:27 ` pinskia at gcc dot gnu dot org
2005-03-04  6:24 ` cvs-commit at gcc dot gnu dot org
2005-03-04  6:26 ` pinskia at gcc dot gnu dot org
2005-03-08  0:21 ` steven at gcc dot gnu dot org
2005-03-11  4:53 ` cvs-commit at gcc dot gnu dot org
2005-03-11  5:03 ` phython 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).