public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/15348] New: [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
@ 2004-05-09 19:30 kazu at cs dot umass dot edu
2004-05-09 19:32 ` [Bug optimization/15348] " kazu at cs dot umass dot edu
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-09 19:30 UTC (permalink / raw)
To: gcc-bugs
Convert foo() into baz().
void bar (void);
int
foo (int x, int y)
{
int t1 = x < 0;
int t2 = y < 0;
return t1 || t2;
}
int
baz (int x, int y)
{
return (x | y) < 0;
}
Needless to mention, we should do this fairly late in SSA optimizations.
--
Summary: [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
2004-05-09 19:30 [Bug optimization/15348] New: [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0 kazu at cs dot umass dot edu
@ 2004-05-09 19:32 ` kazu at cs dot umass dot edu
2004-05-09 19:41 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-09 19:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-05-09 19:32 -------
Another one just like above:
void bar (void);
void
foo (int a, int b)
{
if (a != 0)
return;
if (b != 0)
return;
bar ();
}
void
baz (int a, int b)
{
if ((a | b) == 0)
bar ();
}
See also PR 15241.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
2004-05-09 19:30 [Bug optimization/15348] New: [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0 kazu at cs dot umass dot edu
2004-05-09 19:32 ` [Bug optimization/15348] " kazu at cs dot umass dot edu
@ 2004-05-09 19:41 ` pinskia at gcc dot gnu dot org
2004-05-09 22:11 ` pinskia at gcc dot gnu dot org
2004-05-25 0:09 ` [Bug tree-optimization/15348] " pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-09 19:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-09 19:41 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-05-09 19:41:56
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
2004-05-09 19:30 [Bug optimization/15348] New: [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0 kazu at cs dot umass dot edu
2004-05-09 19:32 ` [Bug optimization/15348] " kazu at cs dot umass dot edu
2004-05-09 19:41 ` pinskia at gcc dot gnu dot org
@ 2004-05-09 22:11 ` pinskia at gcc dot gnu dot org
2004-05-25 0:09 ` [Bug tree-optimization/15348] " pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-09 22:11 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |15357
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
2004-05-09 19:30 [Bug optimization/15348] New: [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0 kazu at cs dot umass dot edu
` (2 preceding siblings ...)
2004-05-09 22:11 ` pinskia at gcc dot gnu dot org
@ 2004-05-25 0:09 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-25 0:09 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-05-24 1:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-09 19:30 [Bug optimization/15348] New: [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0 kazu at cs dot umass dot edu
2004-05-09 19:32 ` [Bug optimization/15348] " kazu at cs dot umass dot edu
2004-05-09 19:41 ` pinskia at gcc dot gnu dot org
2004-05-09 22:11 ` pinskia at gcc dot gnu dot org
2004-05-25 0:09 ` [Bug tree-optimization/15348] " pinskia at gcc dot gnu dot 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).