public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/42195] New: missed xnor optimization.
@ 2009-11-27 13:25 pluto at agmk dot net
2009-11-27 15:07 ` [Bug tree-optimization/42195] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 4+ messages in thread
From: pluto at agmk dot net @ 2009-11-27 13:25 UTC (permalink / raw)
To: gcc-bugs
bool xnor_1( bool x, bool y ) { return !( x ^ y ); }
bool xnor_2( bool x, bool y ) { return ( x && y ) || ( !x && !y ); }
both functions should emit (x==y) code, but _2 isn't optimized.
bool xnor_1(bool, bool) (x, y)
{
int D.2085;
<bb 0>:
return x == y;
}
bool xnor_2(bool, bool) (x, y)
{
bool D.2181;
int prephitmp.51;
bool D.2098;
bool D.2097;
bool D.2096;
bool iftmp.0;
int D.2090;
<bb 0>:
if (x == 0) goto <L2>; else goto <L0>;
<L0>:;
(void) 0;
prephitmp.51 = (int) y;
goto <bb 3> (<L5>);
<L2>:;
(void) 0;
prephitmp.51 = (int) (y == 0);
<L5>:;
return prephitmp.51;
}
--
Summary: missed xnor optimization.
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC host triplet: x86_64-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42195
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/42195] missed xnor optimization.
2009-11-27 13:25 [Bug tree-optimization/42195] New: missed xnor optimization pluto at agmk dot net
@ 2009-11-27 15:07 ` rguenth at gcc dot gnu dot org
0 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-27 15:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-11-27 15:07 -------
Confirmed. This somehow looks like a variant of PR42117. Or of course a
missed folding - though I believe we shouldn't match this big patterns in fold
anymore.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |42117
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.5.0
Last reconfirmed|0000-00-00 00:00:00 |2009-11-27 15:07:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42195
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/42195] missed xnor optimization.
[not found] <bug-42195-4@http.gcc.gnu.org/bugzilla/>
2021-06-06 6:23 ` pinskia at gcc dot gnu.org
@ 2022-11-26 7:08 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-26 7:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42195
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=80588
Status|ASSIGNED |RESOLVED
Target Milestone|--- |13.0
Resolution|--- |FIXED
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed for GCC 13 by r13-1779-g375668e0508 .
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/42195] missed xnor optimization.
[not found] <bug-42195-4@http.gcc.gnu.org/bugzilla/>
@ 2021-06-06 6:23 ` pinskia at gcc dot gnu.org
2022-11-26 7:08 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-06 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42195
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-26 7:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-27 13:25 [Bug tree-optimization/42195] New: missed xnor optimization pluto at agmk dot net
2009-11-27 15:07 ` [Bug tree-optimization/42195] " rguenth at gcc dot gnu dot org
[not found] <bug-42195-4@http.gcc.gnu.org/bugzilla/>
2021-06-06 6:23 ` pinskia at gcc dot gnu.org
2022-11-26 7:08 ` 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).