public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-15911-4@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/15911] New: DOM optimization not performed
@ 2004-06-10 17:18 dann at godzilla dot ics dot uci dot edu
  2005-07-04 21:42 ` [Bug tree-optimization/15911] VRP/DOM does not like TRUTH_AND_EXPR pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-06-10 17:18 UTC (permalink / raw)
  To: gcc-bugs

On x86_64-unknown-linux-gnu (RHEL3)
using 
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-24)
as the bootstrap compiler

The following code does not get optimized: 
(the link_error calls should all be removed)

extern int link_error (int);

int tst2 (int x, int y)
{
  if ((x > 5555) && (y < 6666))
    {
      if (x > 5555)
        if (y < 6666)
          return 1111;
        else
          return link_error (2222);
      else
        if (y < 6666)
          return link_error (3333);
        else
          return link_error (4444);
    }
  else
    return 0;
}

The .t53.vars dump is:

;; Function tst2 (tst2)

tst2 (x, y)
{
  int T.67;
  _Bool T.65;
  _Bool T.64;

<bb 0>:
  T.64 = x > 5555;
  T.65 = y <= 6665;
  if (T.64 && T.65) goto <L0>; else goto <L11>;

<L11>:;
  T.67 = 0;
  goto <bb 7> (<L8>);

<L0>:;
  if (T.64) goto <L1>; else goto <L4>;

<L1>:;
  if (T.65) goto <L12>; else goto <L3>;

<L12>:;
  T.67 = 1111;
  goto <bb 7> (<L8>);

<L3>:;
  T.67 = link_error (2222) [tail call];
  goto <bb 7> (<L8>);

<L4>:;
  if (T.65) goto <L5>; else goto <L6>;

<L5>:;
  T.67 = link_error (3333) [tail call];
  goto <bb 7> (<L8>);

<L6>:;
  T.67 = link_error (4444) [tail call];

<L8>:;
  return T.67;

}

The code is optimized just fine when compiled on i686-linux!
(the dom1 pass removes the link_error calls)
Like so:

;; Function tst2 (tst2)

tst2 (x, y)
{
  int T.49;

<bb 0>:
  if (x <= 5555) goto <L13>; else goto <L0>;

<L13>:;
  T.49 = 0;
  goto <bb 3> (<L9>);

<L0>:;
  if (y > 6665) goto <L8>; else goto <L14>;

<L14>:;
  T.49 = 1111;
  goto <bb 3> (<L9>);

<L8>:;
  T.49 = 0;

<L9>:;
  return T.49;

}

The problems starts with the stage1 compiler (even stage1 is compiled with gcc
-O0). 
The bootstrap succeeds, and the test results are very similar to other results
posted to gcc-testresults. 
This has been around for a while at least 1 month.
I don't have access to another 64-bit platform right now to check if this has
something to do with 64-bit systems.

-- 
           Summary: DOM optimization not performed
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2013-11-09 20:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15911-1008@http.gcc.gnu.org/bugzilla/>
2006-03-21 16:02 ` [Bug tree-optimization/15911] VRP/DOM does not like TRUTH_AND_EXPR rguenth at gcc dot gnu dot org
2006-03-21 16:19 ` dnovillo at gcc dot gnu dot org
2006-03-21 16:48 ` rguenth at gcc dot gnu dot org
2006-03-21 16:57 ` law at redhat dot com
2006-03-22  4:57 ` law at redhat dot com
2006-03-22  9:00 ` rguenth at gcc dot gnu dot org
2006-03-22 18:13 ` law at redhat dot com
2006-04-07 12:23 ` rguenth at gcc dot gnu dot org
2006-04-13 18:14 ` law at redhat dot com
2006-04-17 16:40 ` law at redhat dot com
2006-04-17 16:54 ` rguenth at gcc dot gnu dot org
2006-04-20 16:25 ` law at redhat dot com
2006-04-20 16:33 ` rguenther at suse dot de
2006-04-25 15:55 ` rguenth at gcc dot gnu dot org
2006-04-26  8:47 ` rguenth at gcc dot gnu dot org
2006-04-30 19:25 ` dann at godzilla dot ics dot uci dot edu
2006-05-01 21:12 ` rguenth at gcc dot gnu dot org
2006-05-15 19:30 ` patchapp at dberlin dot org
2006-10-22 20:11 ` rguenth at gcc dot gnu dot org
2006-10-22 20:16 ` rguenth at gcc dot gnu dot org
     [not found] <bug-15911-4@http.gcc.gnu.org/bugzilla/>
2013-11-09 20:40 ` pinskia at gcc dot gnu.org
2004-06-10 17:18 [Bug tree-optimization/15911] New: DOM optimization not performed dann at godzilla dot ics dot uci dot edu
2005-07-04 21:42 ` [Bug tree-optimization/15911] VRP/DOM does not like TRUTH_AND_EXPR pinskia at gcc dot gnu dot org
2005-09-08 18:20 ` dnovillo at gcc dot gnu dot org
2005-09-08 19:04 ` law at redhat dot com
2005-09-08 19:07 ` dnovillo 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).