public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/39717]  New: [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines
@ 2009-04-10 12:46 bonzini at gnu dot org
  2009-04-16  3:08 ` [Bug target/39717] " hp at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bonzini at gnu dot org @ 2009-04-10 12:46 UTC (permalink / raw)
  To: gcc-bugs

/* cris and mn10300 -O2 */
foo (float *c)
{
  union
  {
    float r;
    unsigned int i;
  }
  e;
  e.r = c[0];
  if (e.i < 0x3f7f0000) return (e.r = e.r / 2.0f, e.i);
  return ((int) e.i < 0) ? 0 : 255;
}



Probably this is a duplicate too for vax:

int a, b;
int baz (short x) {  return x; }
int bar (int x) {
  if (baz (a ^ x ^ a)) return b;
  return 0;
}
int foo (void) {
  return bar (a == 0 || 1 == 1 - a) ? 1 : bar (1 && a);
}


-- 
           Summary: [cond-optab] CSE does not put subregs into COMPAREs on
                    many CC0 machines
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonzini at gnu dot org
OtherBugsDependingO 39714
             nThis:


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


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

* [Bug target/39717] [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines
  2009-04-10 12:46 [Bug target/39717] New: [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines bonzini at gnu dot org
@ 2009-04-16  3:08 ` hp at gcc dot gnu dot org
  2009-04-16  8:05 ` bonzini at gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-04-16  3:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hp at gcc dot gnu dot org  2009-04-16 03:08 -------
Is this a cond-optab regression or "just" an observation?


-- 

hp at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hp at gcc dot gnu dot org


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


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

* [Bug target/39717] [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines
  2009-04-10 12:46 [Bug target/39717] New: [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines bonzini at gnu dot org
  2009-04-16  3:08 ` [Bug target/39717] " hp at gcc dot gnu dot org
@ 2009-04-16  8:05 ` bonzini at gnu dot org
  2009-05-12 12:06 ` [Bug target/39717] [4.5 Regression][cond-optab] " bonzini at gnu dot org
  2009-07-14 22:38 ` bonzini at gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bonzini at gnu dot org @ 2009-04-16  8:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bonzini at gnu dot org  2009-04-16 08:04 -------
Subject: Re:  [cond-optab] CSE does not put subregs into
 COMPAREs on many CC0 machines

> Is this a cond-optab regression or "just" an observation?

Yes, it causes extra moves on code using unions.  Where we have

   r20:SI=r19:SF#0    where X#0 = (subreg X 0)
   cc0=r20:SI

is now

   r20:SI=r19:SF#0
   cc0=cmp(r20:SI,0)

and CSE is somehow not able to turn it into

   cc0=cmp(r19:SF#0,0)


-- 


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


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

* [Bug target/39717] [4.5 Regression][cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines
  2009-04-10 12:46 [Bug target/39717] New: [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines bonzini at gnu dot org
  2009-04-16  3:08 ` [Bug target/39717] " hp at gcc dot gnu dot org
  2009-04-16  8:05 ` bonzini at gnu dot org
@ 2009-05-12 12:06 ` bonzini at gnu dot org
  2009-07-14 22:38 ` bonzini at gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bonzini at gnu dot org @ 2009-05-12 12:06 UTC (permalink / raw)
  To: gcc-bugs



-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
            Summary|[cond-optab] CSE does not   |[4.5 Regression][cond-optab]
                   |put subregs into COMPAREs on|CSE does not put subregs
                   |many CC0 machines           |into COMPAREs on many CC0
                   |                            |machines
   Target Milestone|---                         |4.5.0


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


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

* [Bug target/39717] [4.5 Regression][cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines
  2009-04-10 12:46 [Bug target/39717] New: [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines bonzini at gnu dot org
                   ` (2 preceding siblings ...)
  2009-05-12 12:06 ` [Bug target/39717] [4.5 Regression][cond-optab] " bonzini at gnu dot org
@ 2009-07-14 22:38 ` bonzini at gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bonzini at gnu dot org @ 2009-07-14 22:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bonzini at gnu dot org  2009-07-14 22:38 -------
Fixed by the new SRA thanks to its usage of VIEW_CONVERT_EXPR at the tree
level.


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2009-07-14 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-10 12:46 [Bug target/39717] New: [cond-optab] CSE does not put subregs into COMPAREs on many CC0 machines bonzini at gnu dot org
2009-04-16  3:08 ` [Bug target/39717] " hp at gcc dot gnu dot org
2009-04-16  8:05 ` bonzini at gnu dot org
2009-05-12 12:06 ` [Bug target/39717] [4.5 Regression][cond-optab] " bonzini at gnu dot org
2009-07-14 22:38 ` bonzini at 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).