public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/52409] New: ((~a)|(~b)) is not simplified at the tree level
@ 2012-02-28 7:13 pinskia at gcc dot gnu.org
2012-02-28 7:16 ` [Bug tree-optimization/52409] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-28 7:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52409
Bug #: 52409
Summary: ((~a)|(~b)) is not simplified at the tree level
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
Take:
int f(int a, int b)
{
a = ~a;
b = ~b;
return a|b;
}
int g(int a, int b)
{
return ~(a&b);
}
--- CUT ---
Currently the tree level does not try to combine them, fold does it though.
I saw this with bools in GCC itself. In the bool case, we can fold it further
to just (a&b) == 0.
Likewise for (~a)&(~b) into ~(a|b).
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tree-optimization/52409] ((~a)|(~b)) is not simplified at the tree level
2012-02-28 7:13 [Bug tree-optimization/52409] New: ((~a)|(~b)) is not simplified at the tree level pinskia at gcc dot gnu.org
@ 2012-02-28 7:16 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-28 7:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52409
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization, TREE
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-02-28
AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-28 07:13:35 UTC ---
Mine.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-28 7:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28 7:13 [Bug tree-optimization/52409] New: ((~a)|(~b)) is not simplified at the tree level pinskia at gcc dot gnu.org
2012-02-28 7:16 ` [Bug tree-optimization/52409] " 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).