public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND
@ 2004-03-31  2:55 kazu at cs dot umass dot edu
  2004-03-31  3:34 ` [Bug optimization/14792] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-31  2:55 UTC (permalink / raw)
  To: gcc-bugs

Consider:

void bar (void);

void
foo (unsigned int a)
{
  int b = a;
  if (b & 1)
    bar ();
}

I get:
foo (a)
{
  int b;
  _Bool T.1;
  int T.0;

<bb 0>:
  b_2 = (int)a_1;
  T.0_3 = b_2 & 1;
  T.1_4 = (_Bool)T.0_3;
  if (T.1_4) goto <L0>; else goto <L1>;

<L0>:;
  bar () [tail call];

<L1>:;
  return;

}

We could skip "b" like so

  T.0_3 = a_1 & 1;

-- 
           Summary: [tree-ssa] cast elimination opportunity involving an AND
           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=14792


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

end of thread, other threads:[~2004-08-31  4:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-31  2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
2004-03-31  3:34 ` [Bug optimization/14792] " pinskia at gcc dot gnu dot org
2004-03-31  5:40 ` pinskia at gcc dot gnu dot org
2004-03-31  5:43 ` pinskia at gcc dot gnu dot org
2004-05-24 18:13 ` [Bug tree-optimization/14792] " pinskia at gcc dot gnu dot org
2004-05-25 14:32 ` pinskia at gcc dot gnu dot org
2004-06-01 21:01 ` pinskia at gcc dot gnu dot org
2004-08-31  4:11 ` 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).