[Mesa-dev] [PATCH] nir: Optimize useless comparisons against true/false.

Eric Anholt eric at anholt.net
Thu Dec 3 16:05:25 PST 2015


Matt Turner <mattst88 at gmail.com> writes:

> ---
> I add the true/false variables for clarity since there are some existing
> optimizations using ~0 where it actually has nothing to do with true.
>
> I could take it or leave it. We obviously can't use them for feq and
> friends. Maybe itrue/ifalse and ftrue/ffalse?

No changes on my shader-db, but glsl-fs-all-01.shader_test emits a lot
fewer instructions.  For either version:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151203/b6984bc8/attachment.sig>


More information about the mesa-dev mailing list