[Bug middle-end/24427] missing optimization opportunity with binary operators

2007-02-18 Thread ebotcazou at gcc dot gnu dot org


--- Comment #11 from ebotcazou at gcc dot gnu dot org  2007-02-18 18:50 
---
> It's not PR24427 that's the motivation for this backport, but PR 28173.
> In fact, it was *your* request in comment #2 of PR28173 to backport this!

Well, I only requested that you comment on the proposed backport.  And this
was on 2006-09-13, so 5 months ago!

> I'm a little disappointed you'd even question my decision/authority to
> backport a regression fix. :-)

I'm basically paid for that. :-)


-- 


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2007-02-18 Thread roger at eyesopen dot com


--- Comment #10 from roger at eyesopen dot com  2007-02-18 18:10 ---
Hi Eric,

It's not PR24427 that's the motivation for this backport, but PR 28173.
In fact, it was *your* request in comment #2 of PR28173 to backport this!
I'm a little disappointed you'd even question my decision/authority to
backport a regression fix. :-)

Roger
--


-- 


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2007-02-18 Thread ebotcazou at gcc dot gnu dot org


--- Comment #9 from ebotcazou at gcc dot gnu dot org  2007-02-18 17:58 
---
Roger, I'm a little puzzled by your last move: is it really necessary to
backport a patch for a missed optimization, after a delay of 1 full year,
to a branch which is supposed to be in stabilization mode now?  IMHO it's
too late.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||sayle at gcc dot gnu dot
   ||org, ebotcazou at gcc dot
   ||gnu dot org


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2007-02-18 Thread sayle at gcc dot gnu dot org


--- Comment #8 from sayle at gcc dot gnu dot org  2007-02-18 17:10 ---
Subject: Bug 24427

Author: sayle
Date: Sun Feb 18 17:10:19 2007
New Revision: 122100

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122100
Log:

Backport from mainline.
PR middle-end/24427
PR rtl-optimization/28173
* fold-const.c (fold_binary) : Transform (X&C1)|C2
into (X,C2) if C1 is a subset of the bits of C2.  Transform
(X&C1)|C2 into X|C2 if C1|C2 == ~0.  Canonicalize (X&C1)|C2 as
(X&(C1&~C2))|C2.
: Canonicalize (X|C1)&C2 as (X&C2)|(C1&C2).

* gcc.dg/tree-ssa/andor-1.c: New test case.


Added:
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/andor-1.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/fold-const.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2006-09-12 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2006-09-13 04:08 ---
(In reply to comment #6)
> Isn't this a duplicate of PR 28173 now?
Besides PR 28173 is a regression.


-- 


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2006-09-12 Thread bangerth at dealii dot org


--- Comment #6 from bangerth at dealii dot org  2006-09-13 04:02 ---
Isn't this a duplicate of PR 28173 now?


-- 

bangerth at dealii dot org changed:

   What|Removed |Added

 CC||bangerth at dealii dot org


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2006-06-26 Thread ramana dot radhakrishnan at codito dot com


--- Comment #5 from ramana dot radhakrishnan at codito dot com  2006-06-26 
19:13 ---
This should be reopened. A related testcase shows a regression from 3.4.6 to
4.1.1 for m68k-elf shows a regression . combine used to take care of this in
3.4.6   . A backport of the patch is ready with me. If its allowed, I'll put it
up . 

This is the test case . 

#include 
int i;
int main (void)
{

  if ( ((i & ~1) | 1) != ( i | 1))
  printf ("abc");
}

3.4.6 generated 

   .file   "fail.c"
.text
.align  2
.globl  foo
.type   foo, @function
foo:
link.w %a6,#0
unlk %a6
rts
.size   foo, .-foo
.comm   i,4,2
.ident  "GCC: (GNU) 3.4.6"



4.1.2 pre-release generates  

.file   "fail.c"
.section.rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "abc"
.text
.align  2
.globl  main
.type   main, @function
main:
link.w %fp,#0
move.l %d2,-(%sp)
move.l i,%d1
moveq #-2,%d0
and.l %d1,%d0
moveq #1,%d2
or.l %d2,%d0
or.l %d2,%d1
cmp.l %d0,%d1
jbeq .L5
pea .LC0
jbsr printf
addq.l #4,%sp
.L5:
move.l -4(%fp),%d2
unlk %fp
rts
.size   main, .-main
.comm   i,4,2
.ident  "GCC: (GNU) 4.1.2 20060623 (prerelease)"


-- 

ramana dot radhakrishnan at codito dot com changed:

   What|Removed |Added

 CC||ramana dot radhakrishnan at
   ||codito dot com


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2006-02-13 Thread roger at eyesopen dot com


--- Comment #4 from roger at eyesopen dot com  2006-02-14 03:07 ---
This has now been fixed on mainline.


-- 

roger at eyesopen dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.2.0


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2006-02-13 Thread sayle at gcc dot gnu dot org


--- Comment #3 from sayle at gcc dot gnu dot org  2006-02-13 18:33 ---
Subject: Bug 24427

Author: sayle
Date: Mon Feb 13 18:33:32 2006
New Revision: 110918

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110918
Log:

PR middle-end/24427
* fold-const.c (fold_binary) : Transform (X&C1)|C2
into (X,C2) if C1 is a subset of the bits of C2.  Transform
(X&C1)|C2 into X|C2 if C1|C2 == ~0.  Canonicalize (X&C1)|C2 as
(X&(C1&~C2))|C2.
: Canonicalize (X|C1)&C2 as (X&C2)|(C1&C2).

* gcc.dg/tree-ssa/andor-1.c: New test case.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/andor-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

2005-10-19 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2005-10-19 10:25 ---
fold-const.c:distribute_bit_expr should be extended to handle this case.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org


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



[Bug middle-end/24427] missing optimization opportunity with binary operators

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


--- Comment #1 from pinskia at gcc dot gnu dot org  2005-10-18 13:42 ---
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

OtherBugsDependingO||19987
  nThis||
 Status|UNCONFIRMED |NEW
  Component|tree-optimization   |middle-end
 Ever Confirmed|0   |1
   Keywords||missed-optimization
   Last reconfirmed|-00-00 00:00:00 |2005-10-18 13:42:23
   date||


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