This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Is it Okay for GCC to do the following simplifications with "-ffast-math" flag
- From: Renlin Li <renlin dot li at arm dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Wilco dot Dijkstra at arm dot com, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Tue, 05 May 2015 14:27:02 +0100
- Subject: Is it Okay for GCC to do the following simplifications with "-ffast-math" flag
- Authentication-results: sourceware.org; auth=none
Hi all,
For the following illustrative code,
double f1(int x) { return (double)(float)x; } --> return (double)x;
int f2(double x) { return (int)(float)x; } --> return (int)x;
Is it Okay for the compiler to do the simplifications shown above with
fast-match enabled?
Regards,
Renlin Li