public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-15458-4@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/15458] New: Combine ~ and ^.
@ 2004-05-16  1:55 kazu at cs dot umass dot edu
  2004-05-16 10:02 ` [Bug tree-optimization/15458] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-16  1:55 UTC (permalink / raw)
  To: gcc-bugs

unsigned int
xornot (unsigned int a)
{
  unsigned int b = a ^ 0xffff;
  unsigned int c = ~b;
  return c;
}

unsigned int
notxor (unsigned int a)
{
  unsigned int b = ~a;
  unsigned int c = b ^ 0xffff;
  return c;
}

The last tree-ssa form looks like:

;; Function xornot (xornot)

xornot (a)
{
  unsigned int c;
  unsigned int b;

<bb 0>:
  b_2 = a_1 ^ 65535;
  c_3 = ~b_2;
  return c_3;

}



;; Function notxor (notxor)

notxor (a)
{
  unsigned int c;
  unsigned int b;

<bb 0>:
  b_2 = ~a_1;
  c_3 = b_2 ^ 65535;
  return c_3;

}

-- 
           Summary: Combine ~ and ^.
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          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=15458


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15458-5009@http.gcc.gnu.org/bugzilla/>
2005-11-30 17:32 ` [Bug tree-optimization/15458] Combine ~ and ^ pinskia at gcc dot gnu dot org
2005-11-30 17:41 ` pinskia at gcc dot gnu dot org
2005-12-04  4:27 ` pinskia at gcc dot gnu dot org
2006-10-29 17:51 ` sayle at gcc dot gnu dot org
2006-10-29 20:27 ` pinskia at gcc dot gnu dot org
     [not found] <bug-15458-4@http.gcc.gnu.org/bugzilla/>
2014-10-31  4:02 ` pinskia at gcc dot gnu.org
2004-05-16  1:55 [Bug tree-optimization/15458] New: " kazu at cs dot umass dot edu
2004-05-16 10:02 ` [Bug tree-optimization/15458] " pinskia at gcc dot gnu dot org
2004-05-16 10:49 ` pinskia at gcc dot gnu dot org
2004-05-17 18:53 ` pinskia at gcc dot gnu dot org
2004-06-02 21:14 ` 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).