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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ messages in thread

* [Bug tree-optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
       [not found] <bug-15348-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-03-11  7:06 ` dimhen at gmail dot com
@ 2020-04-19 18:17 ` law at redhat dot com
  3 siblings, 0 replies; 10+ messages in thread
From: law at redhat dot com @ 2020-04-19 18:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Jeffrey A. Law <law at redhat dot com> ---
Resolved at some point in the past.  Not worth the trouble to bisect.

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

* [Bug tree-optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
       [not found] <bug-15348-4@http.gcc.gnu.org/bugzilla/>
  2013-11-09 20:40 ` pinskia at gcc dot gnu.org
  2014-10-31  4:01 ` pinskia at gcc dot gnu.org
@ 2020-03-11  7:06 ` dimhen at gmail dot com
  2020-04-19 18:17 ` law at redhat dot com
  3 siblings, 0 replies; 10+ messages in thread
From: dimhen at gmail dot com @ 2020-03-11  7:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348

Dmitry G. Dyachenko <dimhen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dimhen at gmail dot com

--- Comment #4 from Dmitry G. Dyachenko <dimhen at gmail dot com> ---
x86_64 r10-7080 for me produce identical code
-- c#0 with -O2
-- c#1 with -O

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

* [Bug tree-optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
       [not found] <bug-15348-4@http.gcc.gnu.org/bugzilla/>
  2013-11-09 20:40 ` pinskia at gcc dot gnu.org
@ 2014-10-31  4:01 ` pinskia at gcc dot gnu.org
  2020-03-11  7:06 ` dimhen at gmail dot com
  2020-04-19 18:17 ` law at redhat dot com
  3 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-10-31  4:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15348
Bug 15348 depends on bug 15459, which changed state.

Bug 15459 Summary: [meta-bug] there should be a tree combiner like the rtl one
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15459

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED


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

* [Bug tree-optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
       [not found] <bug-15348-4@http.gcc.gnu.org/bugzilla/>
@ 2013-11-09 20:40 ` pinskia at gcc dot gnu.org
  2014-10-31  4:01 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-09 20:40 UTC (permalink / raw)
  To: gcc-bugs

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

Bug 15348 depends on bug 15357, which changed state.

Bug 15357 Summary: [tree-ssa] combing if statements
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15357

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED


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

* [Bug tree-optimization/15348] [tree-ssa] Convert (x < 0) || (y < 0) into (x | y) < 0.
       [not found] <20040509193050.15348.kazu@gcc.gnu.org>
@ 2005-09-30 22:29 ` steven at gcc dot gnu dot org
  0 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-09-30 22:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-09-30 22:29 -------
For AMD64, the functions from the first test case don't produce the 
same code either, so combine is not catching this either. 
 

-- 


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


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

end of thread, other threads:[~2020-04-19 18:17 UTC | newest]

Thread overview: 10+ 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
     [not found] <20040509193050.15348.kazu@gcc.gnu.org>
2005-09-30 22:29 ` steven at gcc dot gnu dot org
     [not found] <bug-15348-4@http.gcc.gnu.org/bugzilla/>
2013-11-09 20:40 ` pinskia at gcc dot gnu.org
2014-10-31  4:01 ` pinskia at gcc dot gnu.org
2020-03-11  7:06 ` dimhen at gmail dot com
2020-04-19 18:17 ` law at redhat dot com

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).