http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47989
Summary: -mrecip causes 482.sphinx3 to miscompare
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rgue...@gcc.gnu.org
Target: x86_64-*-*
We currently miscompare 482.sphinx3 with -Ofast -mrecip because for
float foo (float x, float y)
{
return ((int)(x/y + 0.5)) * y;
}
we use rcpss for the division by y. This results in a possible error
of +-1 for the integer intermediate result and an error of +-y for
the overall result.