public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20192] New: Unnecessary jump from &&
@ 2005-02-24 18:22 falk at debian dot org
  2005-02-24 22:22 ` [Bug tree-optimization/20192] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: falk at debian dot org @ 2005-02-24 18:22 UTC (permalink / raw)
  To: gcc-bugs

This function:

#define PMD_MASK    (~((1UL << 23) - 1))
void clear_pmd_range(unsigned long start, unsigned long end) 
{ 
    if (!(start & ~PMD_MASK) && !(end & ~PMD_MASK)) 
        f(); 
} 

should be optimized to generate the same code as this function:
 
void clear_pmd_range2(unsigned long start, unsigned long end) 
{ 
    if (!((start | end) & ~PMD_MASK)) 
        f(); 
} 

that is, use only one conditional branch (see also
http://linux.bkbits.net:8080/linux-2.5/cset@1.2035.15.4?nav=index.html|ChangeSet@-2w).

-- 
           Summary: Unnecessary jump from &&
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/20192] Unnecessary jump from &&
  2005-02-24 18:22 [Bug tree-optimization/20192] New: Unnecessary jump from && falk at debian dot org
@ 2005-02-24 22:22 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-24 22:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-24 17:49 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-24 17:49:00
               date|                            |


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


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

end of thread, other threads:[~2005-02-24 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-24 18:22 [Bug tree-optimization/20192] New: Unnecessary jump from && falk at debian dot org
2005-02-24 22:22 ` [Bug tree-optimization/20192] " 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).