On Thu, Aug 6, 2015 at 4:36 AM, Thomas Helland
<thomashellan...@gmail.com> wrote:
> -NaN != NaN, and -Inf != Inf, so this should be safe.
> Found while working on my VRP pass.
>
> Shader-db results on my IVB:
> total instructions in shared programs: 1698267 -> 1698067 (-0.01%)
> instructions in affected programs:     15785 -> 15585 (-1.27%)
> helped:                                36
> HURT:                                  0
> GAINED:                                0
> LOST:                                  0
>
> Some shaders was found to have the following pattern in NIR:
> vec1 ssa_26 = fneg ssa_21
> vec1 ssa_27 = fne ssa_21, ssa_26
>
> Make that:
> vec1 ssa_27 = fne ssa_21, 0.0f
>
> This is found in Dota2 and Brutal Legend.
> One shader is cut by 8%, from 323 -> 296 instructons in SIMD8
>
> Signed-off-by: Thomas Helland <thomashellan...@gmail.com>
> ---

I have seen this pattern before and I believe this is safe.

Reviewed-by: Matt Turner <matts...@gmail.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to