This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49984] New: VRP does not handle BIT_XOR_EXPR
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 5 Aug 2011 07:39:13 +0000
- Subject: [Bug tree-optimization/49984] New: VRP does not handle BIT_XOR_EXPR
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49984
Summary: VRP does not handle BIT_XOR_EXPR
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
In
int f(int x)
{
if (x >= 0 && x <= 3)
{
x = x ^ 3;
x = x & 3;
}
return x;
}
the x = x & 3 statement should be removed by simplify_bit_ops_using_ranges,
but propagation does not handle BIT_XOR_EXPR and thus the input range to
this statement is VARYING.