public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14706] New: [tree-ssa] range checks should be merged.
@ 2004-03-24  5:22 kazu at cs dot umass dot edu
  2004-03-24  5:31 ` [Bug optimization/14706] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-24  5:22 UTC (permalink / raw)
  To: gcc-bugs

We know that fold() can fold (a > 10 && a < 20) into
((unsigned int) (a - 11) <= 8).

We should also be able to optimize foo() in a similar way.
Note that bar() can be implemented using a conditional move and no jump.

int g;

void
foo (int a)
{
  if (a > 10)
    if (a < 20)
      g = 0;
}

void
bar (int a)
{
  if ((unsigned int) (a - 11) <= 8)
    g = 0;
}

-- 
           Summary: [tree-ssa] range checks should be merged.
           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=14706


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

* [Bug optimization/14706] [tree-ssa] range checks should be merged.
  2004-03-24  5:22 [Bug optimization/14706] New: [tree-ssa] range checks should be merged kazu at cs dot umass dot edu
@ 2004-03-24  5:31 ` pinskia at gcc dot gnu dot org
  2004-04-04 16:29 ` kazu at cs dot umass dot edu
  2004-05-24 17:55 ` [Bug tree-optimization/14706] " pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-24  5:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-24 05:31 -------
Confirmed, this should only happen right before converting to RTL as it will prevent other optimizations 
from happening.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-24 05:31:10
               date|                            |
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/14706] [tree-ssa] range checks should be merged.
  2004-03-24  5:22 [Bug optimization/14706] New: [tree-ssa] range checks should be merged kazu at cs dot umass dot edu
  2004-03-24  5:31 ` [Bug optimization/14706] " pinskia at gcc dot gnu dot org
@ 2004-04-04 16:29 ` kazu at cs dot umass dot edu
  2004-05-24 17:55 ` [Bug tree-optimization/14706] " pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-04-04 16:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2004-04-04 16:29 -------
Speaking of "should only happen right before ...", we may want to
disable the range merging code in fold() because that tends to create
temporaries (after we have the ability to merge ranges in tree-ssa).
AFAIK, the more temporaries we have, the more memory usage, the fewer
jump threading opportunities, etc.


-- 


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


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

* [Bug tree-optimization/14706] [tree-ssa] range checks should be merged.
  2004-03-24  5:22 [Bug optimization/14706] New: [tree-ssa] range checks should be merged kazu at cs dot umass dot edu
  2004-03-24  5:31 ` [Bug optimization/14706] " pinskia at gcc dot gnu dot org
  2004-04-04 16:29 ` kazu at cs dot umass dot edu
@ 2004-05-24 17:55 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 17:55 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

end of thread, other threads:[~2004-05-24  1:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-24  5:22 [Bug optimization/14706] New: [tree-ssa] range checks should be merged kazu at cs dot umass dot edu
2004-03-24  5:31 ` [Bug optimization/14706] " pinskia at gcc dot gnu dot org
2004-04-04 16:29 ` kazu at cs dot umass dot edu
2004-05-24 17:55 ` [Bug tree-optimization/14706] " 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).