public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/28868]  New: Not elimintation the PHIs which have the same agruments
@ 2006-08-28  5:52 pinskia at gcc dot gnu dot org
  2006-08-28  5:54 ` [Bug tree-optimization/28868] " pinskia at gcc dot gnu dot org
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-28  5:52 UTC (permalink / raw)
  To: gcc-bugs

These two functions should produce the same asm but they don't:
int f(int t, int a, int b)
{
  int c, d;
  if (t)
  {
    c = a;
    d = a;
  }
  else
  {
    c = b;
    d = b;
  }
  return c+d;
}

int f1(int t, int a, int b)
{
  int c;
  c = t?a:b;
  return c+c;
}

----------------
f1 is better optimized because it has less register pressure than f.
Note this was reduced from a problem in PR23305.


-- 
           Summary: Not elimintation the PHIs which have the same agruments
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
OtherBugsDependingO 23305
             nThis:


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


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

end of thread, other threads:[~2010-02-26 11:05 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-28  5:52 [Bug tree-optimization/28868] New: Not elimintation the PHIs which have the same agruments pinskia at gcc dot gnu dot org
2006-08-28  5:54 ` [Bug tree-optimization/28868] " pinskia at gcc dot gnu dot org
2006-08-28  6:01 ` [Bug tree-optimization/28868] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-08-28  6:06 ` pinskia at gcc dot gnu dot org
2006-08-28  6:43 ` pinskia at gcc dot gnu dot org
2006-08-28 13:59 ` steven at gcc dot gnu dot org
2006-08-28 14:37 ` pinskia at gcc dot gnu dot org
2006-08-29  5:51 ` steven at gcc dot gnu dot org
2006-08-29 14:59 ` [Bug tree-optimization/28868] [4.0/4.1/4.2 Regression] Not elimintating " dberlin at gcc dot gnu dot org
2006-08-30  4:44 ` pinskia at gcc dot gnu dot org
2006-09-01 22:09 ` mmitchel at gcc dot gnu dot org
2007-02-03 19:38 ` [Bug tree-optimization/28868] [4.0/4.1/4.2/4.3 Regression] Not elimintating the PHIs which have the same arguments gdr at gcc dot gnu dot org
2007-02-03 20:55 ` pinskia at gcc dot gnu dot org
2007-02-14  9:16 ` mmitchel at gcc dot gnu dot org
2007-07-01  1:09 ` pinskia at gcc dot gnu dot org
2007-11-04 15:46 ` rguenth at gcc dot gnu dot org
2007-11-04 19:24 ` dberlin at dberlin dot org
2007-11-05  6:13 ` [Bug tree-optimization/28868] [4.0/4.1/4.2/4.3 Regression] Not eliminating " sebpop at gmail dot com
2008-07-04 21:29 ` [Bug tree-optimization/28868] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2009-02-04  7:40 ` bonzini at gnu dot org
2009-02-04 10:15 ` rguenth at gcc dot gnu dot org
2009-03-25 13:18 ` rguenth at gcc dot gnu dot org
2009-03-31 19:41 ` [Bug tree-optimization/28868] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
2009-04-04 17:57 ` rguenth at gcc dot gnu dot org
2009-04-06 14:56 ` rguenth at gcc dot gnu dot org
2009-04-06 14:56 ` [Bug tree-optimization/28868] [4.3/4.4 " rguenth at gcc dot gnu dot org
2009-08-04 12:36 ` rguenth at gcc dot gnu dot org
2010-02-26  1:34 ` law at redhat dot com
2010-02-26 11:05 ` rguenth 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).