This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15458] New: Combine ~ and ^.
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 May 2004 12:18:01 -0000
- Subject: [Bug tree-optimization/15458] New: Combine ~ and ^.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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