Date: Tue, 3 Apr 2012 15:58:33 +0200 From: Thomas Mueller <tmueller@sysgo.com> To: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> Cc: freebsd-current@freebsd.org Subject: Re: -ffast-math in Ports and wrong generated code Message-ID: <20120403155833.2f084c75@tmu.ulm.sysgo.com> In-Reply-To: <20120403112111.GA39616@pm513-1.comsys.ntu-kpi.kiev.ua> References: <20120403112111.GA39616@pm513-1.comsys.ntu-kpi.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 3 Apr 2012 14:21:11 +0300, Andrey Simonenko wrote: > At least finite() function call was eliminated from the result Assembler > code when -ffast-math option is used, tested on 9.0-STABLE and 10.0-CURRENT. The documentation for -ffast-math once (GCC 3.x?) contained -ffast-math Might allow some programs designed to not be too dependent on IEEE behavior for floating-point to run faster, or die trying. which seems like what you're observing. -ffast-math includes -ffinite-math-only which assumes that floating-point arguments and results are never NaNs or +-Infs. Compiling your code with "-ffast-math -fno-finite-math-only" should restore the call to finite(). -- Thomas Mueller
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120403155833.2f084c75>