[Mesa-dev] [PATCH 2/3] nir: Simplify feq(fneg(a), a)) -> feq(a, 0.0)

Matt Turner mattst88 at gmail.com
Thu Aug 6 15:49:46 PDT 2015


On Thu, Aug 6, 2015 at 4:36 AM, Thomas Helland
<thomashelland90 at gmail.com> wrote:
> The positive and negative value of a float can only
> be equal to each other if it is -0.0f and 0.0f.
> This is safe for Nan and Inf, as -Nan != Nan, and -Inf != Inf
> This gives no changes in my shader-db
>
> Signed-off-by: Thomas Helland <thomashelland90 at gmail.com>
> ---

I believe this is also safe.

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list