public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/59100] requesting optimization of safe rotate function
       [not found] <bug-59100-4@http.gcc.gnu.org/bugzilla/>
@ 2013-11-13  7:03 ` glisse at gcc dot gnu.org
  2013-11-13  8:06 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-11-13  7:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
IIRC we already added another safe rotate form this year based on a report by
Niels, you may want to search for that (maybe in the comment before
simplify_rotate in tree-ssa-forwprop.c).

Basically you are asking to optimize n?rotate(x,n):x to rotate(x,n), makes
sense.


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

* [Bug c/59100] requesting optimization of safe rotate function
       [not found] <bug-59100-4@http.gcc.gnu.org/bugzilla/>
  2013-11-13  7:03 ` [Bug c/59100] requesting optimization of safe rotate function glisse at gcc dot gnu.org
@ 2013-11-13  8:06 ` jakub at gcc dot gnu.org
  2013-11-13 12:20 ` [Bug tree-optimization/59100] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-11-13  8:06 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, see PR45216 and PR57157.  Recognizing n?rotate<x,n>:x as rotate<x,n> can
be done, but probably not in forwprop or at least not at the same spot as
simplify_rotate, because it involves PHIs and different basic blocks.
Anyway, if you are going to recommend some idiom, I think the one in PR57157 is
better because if it doesn't get optimized into the rotate, it at least doesn't
contain any conditionals.


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

* [Bug tree-optimization/59100] requesting optimization of safe rotate function
       [not found] <bug-59100-4@http.gcc.gnu.org/bugzilla/>
  2013-11-13  7:03 ` [Bug c/59100] requesting optimization of safe rotate function glisse at gcc dot gnu.org
  2013-11-13  8:06 ` jakub at gcc dot gnu.org
@ 2013-11-13 12:20 ` rguenth at gcc dot gnu.org
  2014-02-01 18:42 ` glisse at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-13 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-13
          Component|c                           |tree-optimization
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
phiopt would be the pass to recognize new patterns with PHIs, it should be
reasonably simple to add there in the value_replacement handler.


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

* [Bug tree-optimization/59100] requesting optimization of safe rotate function
       [not found] <bug-59100-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-11-13 12:20 ` [Bug tree-optimization/59100] " rguenth at gcc dot gnu.org
@ 2014-02-01 18:42 ` glisse at gcc dot gnu.org
  2014-05-08 13:17 ` glisse at gcc dot gnu.org
  2014-05-08 13:23 ` glisse at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-02-01 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
Created attachment 32013
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32013&action=edit
phiopt patch

Needs more comments and a testcase, but this passes regtesting and seems to
work. For next stage 1...


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

* [Bug tree-optimization/59100] requesting optimization of safe rotate function
       [not found] <bug-59100-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-02-01 18:42 ` glisse at gcc dot gnu.org
@ 2014-05-08 13:17 ` glisse at gcc dot gnu.org
  2014-05-08 13:23 ` glisse at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-05-08 13:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Thu May  8 13:17:01 2014
New Revision: 210212

URL: http://gcc.gnu.org/viewcvs?rev=210212&root=gcc&view=rev
Log:
2014-05-08  Marc Glisse  <marc.glisse@inria.fr>

    PR tree-optimization/59100
gcc/
    * tree-ssa-phiopt.c: Include tree-inline.h.
    (neutral_element_p, absorbing_element_p): New functions.
    (value_replacement): Handle conditional binary operations with a
    neutral or absorbing element.
gcc/testsuite/
    * gcc.dg/tree-ssa/phi-opt-12.c: New file.
    * gcc.dg/tree-ssa/phi-opt-13.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-12.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-13.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-phiopt.c


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

* [Bug tree-optimization/59100] requesting optimization of safe rotate function
       [not found] <bug-59100-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-05-08 13:17 ` glisse at gcc dot gnu.org
@ 2014-05-08 13:23 ` glisse at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-05-08 13:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.10.0

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
Done.


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

end of thread, other threads:[~2014-05-08 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-59100-4@http.gcc.gnu.org/bugzilla/>
2013-11-13  7:03 ` [Bug c/59100] requesting optimization of safe rotate function glisse at gcc dot gnu.org
2013-11-13  8:06 ` jakub at gcc dot gnu.org
2013-11-13 12:20 ` [Bug tree-optimization/59100] " rguenth at gcc dot gnu.org
2014-02-01 18:42 ` glisse at gcc dot gnu.org
2014-05-08 13:17 ` glisse at gcc dot gnu.org
2014-05-08 13:23 ` glisse 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).