public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-19792-4@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/19792] New: Missed optimizations due to signedness in the way
@ 2005-02-06 13:21 kazu@cs.umass.edu
  2005-02-06 13:21 ` [Bug tree-optimization/19792] " kazu@cs.umass.edu
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: kazu@cs.umass.edu @ 2005-02-06 13:21 UTC (permalink / raw)
  To: gcc-bugs

Consider:

extern unsigned char size_lookup[257];

int
foo (unsigned int t)
{
  return (size_lookup [(int) t] == size_lookup[t]);
}

int
bar (unsigned int t)
{
  int a = t;
  return a == t;
}

Both functions should return 1, and in fact that's what the RTL optimizers
notice, but the tree optimizers don't.

This is somewhat related to PR 19790.

-- 
           Summary: Missed optimizations due to signedness in the way
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: missed-optimization, TREE
          Severity: enhancement
          Priority: P2
         Component: tree-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=19792


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

end of thread, other threads:[~2014-10-31  4:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19792-5009@http.gcc.gnu.org/bugzilla/>
2006-05-04 13:57 ` [Bug tree-optimization/19792] Missed optimizations due to signedness in the way rguenth at gcc dot gnu dot org
2006-05-04 15:04 ` rguenth at gcc dot gnu dot org
2006-05-05  9:17 ` pinskia at gcc dot gnu dot org
     [not found] <bug-19792-4@http.gcc.gnu.org/bugzilla/>
2014-10-31  4:02 ` pinskia at gcc dot gnu.org
2005-02-06 13:21 [Bug tree-optimization/19792] New: " kazu@cs.umass.edu
2005-02-06 13:21 ` [Bug tree-optimization/19792] " kazu@cs.umass.edu
2005-02-06 15:34 ` kazu@cs.umass.edu
2005-02-06 16:17 ` pinskia@gcc.gnu.org
2005-02-13 20:56 ` kazu at cs dot umass dot edu
2005-03-16 14:59 ` kazu at cs dot umass dot edu

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