This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30978] New: Does not propagate comparison results
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2007 10:53:11 -0000
- Subject: [Bug tree-optimization/30978] New: Does not propagate comparison results
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
int foo(int a)
{
unsigned int b = a > 0;
char c = b;
return c;
}
is not optimized to
int foo(int a)
{
return a > 0;
}
at the tree level. Forwprop has code to do this if the final propagation
result is in a COND_EXPR.
I have a patch.
--
Summary: Does not propagate comparison results
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: rguenth at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30978