* [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1
[not found] <bug-37516-4@http.gcc.gnu.org/bugzilla/>
@ 2012-02-23 8:48 ` pinskia at gcc dot gnu.org
2012-02-23 9:17 ` rguenther at suse dot de
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-23 8:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-02-23
AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-23 08:42:01 UTC ---
I have an idea on how to fix this.
basically:
~(C - X)
is the same as:
~ - (X - C)
which then can be simplified to
X - (C+1)
This should be done on both the tree level (on the pinskia/treecombine branch
in tree-ssa-fold.c) and the rtl level in simplify-rtx.c.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1
[not found] <bug-37516-4@http.gcc.gnu.org/bugzilla/>
2012-02-23 8:48 ` [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1 pinskia at gcc dot gnu.org
@ 2012-02-23 9:17 ` rguenther at suse dot de
2012-02-23 22:16 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: rguenther at suse dot de @ 2012-02-23 9:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> 2012-02-23 08:47:55 UTC ---
On Thu, 23 Feb 2012, pinskia at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
>
> Andrew Pinski <pinskia at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |ASSIGNED
> Last reconfirmed| |2012-02-23
> AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org
> |gnu.org |
> Ever Confirmed|0 |1
>
> --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-23 08:42:01 UTC ---
> I have an idea on how to fix this.
> basically:
> ~(C - X)
> is the same as:
> ~ - (X - C)
> which then can be simplified to
> X - (C+1)
>
> This should be done on both the tree level (on the pinskia/treecombine branch
> in tree-ssa-fold.c) and the rtl level in simplify-rtx.c.
Maybe get away with these old-stylish names ('tree' and 'fold') and
make it match reality, gimple-ssa-combine.c ;)
Still have to have a look at your branch - do you have a brief
overview documentation, for example on the wiki? What I'd like
to do is have an interface that I can re-use for VN combining,
basically replace its simplify_*_expression functions.
Richard.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1
[not found] <bug-37516-4@http.gcc.gnu.org/bugzilla/>
2012-02-23 8:48 ` [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1 pinskia at gcc dot gnu.org
2012-02-23 9:17 ` rguenther at suse dot de
@ 2012-02-23 22:16 ` pinskia at gcc dot gnu.org
2012-02-24 9:03 ` rguenther at suse dot de
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-23 22:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-23 22:15:05 UTC ---
> Maybe get away with these old-stylish names ('tree' and 'fold') and
> make it match reality, gimple-ssa-combine.c ;)
That sounds like a good idea. I have done that.
>
> Still have to have a look at your branch - do you have a brief
> overview documentation, for example on the wiki? What I'd like
> to do is have an interface that I can re-use for VN combining,
> basically replace its simplify_*_expression functions.
I don't have one yet. But I hope to create one this weekend.
Right now replacing the VN combining with this new functionality will not work
as it scans the defs itself. Though I am moving all the def scanning to its
own function which should allow for the code to be more modular and allow for
the VN combining to work with it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1
[not found] <bug-37516-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2012-02-23 22:16 ` pinskia at gcc dot gnu.org
@ 2012-02-24 9:03 ` rguenther at suse dot de
2012-02-26 1:43 ` pinskia at gcc dot gnu.org
2021-08-03 23:03 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 8+ messages in thread
From: rguenther at suse dot de @ 2012-02-24 9:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> 2012-02-24 08:38:19 UTC ---
On Thu, 23 Feb 2012, pinskia at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
>
> --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-23 22:15:05 UTC ---
>
> > Maybe get away with these old-stylish names ('tree' and 'fold') and
> > make it match reality, gimple-ssa-combine.c ;)
>
> That sounds like a good idea. I have done that.
>
> >
> > Still have to have a look at your branch - do you have a brief
> > overview documentation, for example on the wiki? What I'd like
> > to do is have an interface that I can re-use for VN combining,
> > basically replace its simplify_*_expression functions.
>
> I don't have one yet. But I hope to create one this weekend.
>
> Right now replacing the VN combining with this new functionality will not work
> as it scans the defs itself. Though I am moving all the def scanning to its
> own function which should allow for the code to be more modular and allow for
> the VN combining to work with it.
I think def scanning is ok, but all SSA names should be "valueized" via
a hook first.
Richard.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1
[not found] <bug-37516-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2012-02-24 9:03 ` rguenther at suse dot de
@ 2012-02-26 1:43 ` pinskia at gcc dot gnu.org
2021-08-03 23:03 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-26 1:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-26 00:49:54 UTC ---
(In reply to comment #5)
> I think def scanning is ok, but all SSA names should be "valueized" via
> a hook first.
I wrote up something quickly (but I want to improve it some more and a little
more formal):
http://gcc.gnu.org/wiki/SSACombine
I am thinking about removing the _loc part of the name of the functions since
there is no function which does not take a location_t.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37516] ~(-2 - a) is not being optimized into a + 1
[not found] <bug-37516-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2012-02-26 1:43 ` pinskia at gcc dot gnu.org
@ 2021-08-03 23:03 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-03 23:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37516
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
Resolution|--- |DUPLICATE
Status|ASSIGNED |RESOLVED
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed with r11-5958.
*** This bug has been marked as a duplicate of bug 96685 ***
^ permalink raw reply [flat|nested] 8+ messages in thread