public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/18576] New: missing jump threading because of type changes
@ 2004-11-20  6:29 pinskia at gcc dot gnu dot org
  2004-11-20  6:37 ` [Bug tree-optimization/18576] " pinskia at gcc dot gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 22+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-20  6:29 UTC (permalink / raw)
  To: gcc-bugs

struct loop
{
  int depth;
  struct loop **pred;
};

static __inline__ unsigned char
flow_loop_nested_p (const struct loop *outer, const struct loop *loop)
{
  return (loop->depth > outer->depth
  && loop->pred[outer->depth] == outer);
}

unsigned char
flow_bb_inside_loop_p (const struct loop *loop, const struct loop *source_loop)
{
  return loop == source_loop || flow_loop_nested_p (loop, source_loop);
}

In .64.final_cleanup:
<L2>:;
  iftmp.0 = 1;
  goto <bb 5> (<L14>);

<L4>:;
  iftmp.0 = 0;

<L14>:;
  if ((unsigned char) (int) (unsigned char) iftmp.0 != 0) goto <L8>; else goto <L7>;

See miss this jump threading (in fact we miss it on the RTL level also).
We do get better code already on the tree-cleanup-branch but that is because of my rewrite of PHI-OPT
for that branch we get:
<L12>:;
  iftmp.0 = 0;
  goto <bb 5> (<L4>);

<L1>:;
  iftmp.0 = (int) !(loop != *(source_loop->pred + (struct loop * *) ((unsigned int) D.1160 * 4)));

<L4>:;
  iftmp.1 = (int) ((unsigned char) (int) (unsigned char) iftmp.0 != 0);

-- 
           Summary: missing jump threading because of type changes
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 22+ messages in thread
[parent not found: <bug-18576-6528@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-11-04 15:37 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-20  6:29 [Bug tree-optimization/18576] New: missing jump threading because of type changes pinskia at gcc dot gnu dot org
2004-11-20  6:37 ` [Bug tree-optimization/18576] " pinskia at gcc dot gnu dot org
2004-11-20  6:43 ` pinskia at gcc dot gnu dot org
2004-11-20 16:44 ` steven at gcc dot gnu dot org
2004-11-20 17:01 ` steven at gcc dot gnu dot org
2004-11-20 17:11 ` steven at gcc dot gnu dot org
2004-11-20 17:11 ` pinskia at gcc dot gnu dot org
2004-11-20 17:57 ` [Bug tree-optimization/18576] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-24 22:38 ` steven at gcc dot gnu dot org
2004-11-25  0:22 ` law at redhat dot com
2004-12-12 17:26 ` kazu at cs dot umass dot edu
2004-12-12 17:42 ` kazu at cs dot umass dot edu
2004-12-13 16:33 ` law at redhat dot com
2004-12-13 17:13 ` kazu at cs dot umass dot edu
2004-12-13 17:28 ` law at redhat dot com
2004-12-22 14:08 ` kazu at cs dot umass dot edu
2005-01-06 14:43 ` tobi at gcc dot gnu dot org
2005-03-22 19:26 ` pinskia at gcc dot gnu dot org
2005-05-19 17:38 ` mmitchel at gcc dot gnu dot org
2005-07-22 21:12 ` pinskia at gcc dot gnu dot org
2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-18576-6528@http.gcc.gnu.org/bugzilla/>
2005-11-04 15:37 ` 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).