public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/25290]  New: PHI-OPT could be rewritten so that is uses fold
@ 2005-12-07  3:10 pinskia at gcc dot gnu dot org
  2005-12-12 20:45 ` [Bug tree-optimization/25290] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-07  3:10 UTC (permalink / raw)
  To: gcc-bugs

PHI-OPT could be rewritten so that it uses fold_ternary (type, COND_EXPR, cond,
op1, op2) and that it could remove code which is already done in fold_ternary.

A patch like
http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00153.html
will work but it needs to be reworked for the changes which made it into 4.1.


-- 
           Summary: PHI-OPT could be rewritten so that is uses fold
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
  2005-12-07  3:10 [Bug tree-optimization/25290] New: PHI-OPT could be rewritten so that is uses fold pinskia at gcc dot gnu dot org
@ 2005-12-12 20:45 ` pinskia at gcc dot gnu dot org
  2006-01-09 18:33 ` pinskia at gcc dot gnu dot org
  2008-02-27 13:18 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-12 20:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-12 20:45 -------
I am going to do this.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-12 20:45:29
               date|                            |


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


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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
  2005-12-07  3:10 [Bug tree-optimization/25290] New: PHI-OPT could be rewritten so that is uses fold pinskia at gcc dot gnu dot org
  2005-12-12 20:45 ` [Bug tree-optimization/25290] " pinskia at gcc dot gnu dot org
@ 2006-01-09 18:33 ` pinskia at gcc dot gnu dot org
  2008-02-27 13:18 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-09 18:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-01-09 18:33 -------
No longer working on this, I am too busy working on the gfortran front-end.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pinskia 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=25290



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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
  2005-12-07  3:10 [Bug tree-optimization/25290] New: PHI-OPT could be rewritten so that is uses fold pinskia at gcc dot gnu dot org
  2005-12-12 20:45 ` [Bug tree-optimization/25290] " pinskia at gcc dot gnu dot org
  2006-01-09 18:33 ` pinskia at gcc dot gnu dot org
@ 2008-02-27 13:18 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-27 13:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-02-27 13:18 -------
Subject: Bug 25290

Author: rguenth
Date: Wed Feb 27 13:17:17 2008
New Revision: 132710

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132710
Log:
2008-02-27  Richard Guenther  <rguenther@suse.de>

        PR middle-end/25290
        * fold-const.c (fold_unary): Return the correct argument,
        converted to the result type.

        * gcc.c-torture/execute/pr35390.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr35390.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
       [not found] <bug-25290-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-11-05 15:43 ` pinskia at gcc dot gnu.org
@ 2014-11-06  4:04 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-11-06  4:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25290

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> (In reply to Andrew Pinski from comment #5)
> > Maybe not fold but rather what I am working on, gimple_combine.
> 
> Rather now gimple_simplify (which is from the match-and-simplify branch).

Though I am running into an issue with this.  See
https://gcc.gnu.org/ml/gcc/2014-11/msg00055.html .


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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
       [not found] <bug-25290-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-05-19  9:43 ` glisse at gcc dot gnu.org
@ 2014-11-05 15:43 ` pinskia at gcc dot gnu.org
  2014-11-06  4:04 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-11-05 15:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25290

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Maybe not fold but rather what I am working on, gimple_combine.

Rather now gimple_simplify (which is from the match-and-simplify branch).


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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
       [not found] <bug-25290-4@http.gcc.gnu.org/bugzilla/>
  2012-01-21 22:04 ` pinskia at gcc dot gnu.org
  2012-02-24  0:04 ` pinskia at gcc dot gnu.org
@ 2013-05-19  9:43 ` glisse at gcc dot gnu.org
  2014-11-05 15:43 ` pinskia at gcc dot gnu.org
  2014-11-06  4:04 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 9+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-05-19  9:43 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glisse at gcc dot gnu.org

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
I assume it would help with this?

int f(int a,int b){
  return (a<0)&(b<0);
}
int g(int a,int b){
  return (a<0)?(b<0):0;
}
int h(int a,int b){
  if (a<0) return (b<0);
  return 0;
}

where (on x86) we turn g into f, but we don't notice that h is the same. In
asm, that is:

    movl    %esi, %eax
    andl    %edi, %eax
    shrl    $31, %eax

((a<0)&(b<0) is later optimized to (a&b)<0)

vs

    shrl    $31, %esi
    xorl    %eax, %eax
    testl    %edi, %edi
    cmovs    %esi, %eax


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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
       [not found] <bug-25290-4@http.gcc.gnu.org/bugzilla/>
  2012-01-21 22:04 ` pinskia at gcc dot gnu.org
@ 2012-02-24  0:04 ` pinskia at gcc dot gnu.org
  2013-05-19  9:43 ` glisse at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-24  0:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-23 23:25:53 UTC ---
Maybe not fold but rather what I am working on, gimple_combine.


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

* [Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses fold
       [not found] <bug-25290-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-21 22:04 ` pinskia at gcc dot gnu.org
  2012-02-24  0:04 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-21 22:04 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-21 22:01:00 UTC ---
I actually have a patch to do this but only for the late PHIOPT as it keeps
around cond_expr.


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

end of thread, other threads:[~2014-11-06  4:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-07  3:10 [Bug tree-optimization/25290] New: PHI-OPT could be rewritten so that is uses fold pinskia at gcc dot gnu dot org
2005-12-12 20:45 ` [Bug tree-optimization/25290] " pinskia at gcc dot gnu dot org
2006-01-09 18:33 ` pinskia at gcc dot gnu dot org
2008-02-27 13:18 ` rguenth at gcc dot gnu dot org
     [not found] <bug-25290-4@http.gcc.gnu.org/bugzilla/>
2012-01-21 22:04 ` pinskia at gcc dot gnu.org
2012-02-24  0:04 ` pinskia at gcc dot gnu.org
2013-05-19  9:43 ` glisse at gcc dot gnu.org
2014-11-05 15:43 ` pinskia at gcc dot gnu.org
2014-11-06  4:04 ` pinskia at gcc dot gnu.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).