This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33145] New: Should combine float/int conversion and rounding functions
- 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: 22 Aug 2007 08:32:28 -0000
- Subject: [Bug tree-optimization/33145] New: Should combine float/int conversion and rounding functions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
long
foo (int i)
{
float x;
x = i;
return __builtin_lroundf (x);
}
and
long
foo (int i)
{
return __builtin_lroundf ((float)i);
}
should generate the same code. The former is before expansion
return __builtin_lroundf ((float) i);
which is unfolded while the latter is
return (long int) (float) i;
This has to be addressed in a tree-combiner.
--
Summary: Should combine float/int conversion and rounding
functions
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33145