nir/lower_blend: Avoid useless iand with logic ops
authorAlyssa Rosenzweig <alyssa@collabora.com>
Sat, 26 Nov 2022 02:40:38 +0000 (21:40 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 19 Jan 2023 04:09:17 +0000 (04:09 +0000)
commitdbd0615e7ad0754ab1057cbfa810c42df971c446
tree9c4d4ecb0068071901be8fbd96a6790b55d6eb7d
parentee127f03e45f4100f1109e222a5c4ba42d5dd1d9
nir/lower_blend: Avoid useless iand with logic ops

The upper bits start correctly, there's no need to clear them as long as we keep
them zero'ed by using ixor with a valid bit mask instead of inot.

Makes the code generated for logic op slightly less ridiculous. I'm joking. It's
still ridiculous but I'm not in the mood to fix up the Midgard compiler and it's
just a little ALU for a feature almost nothing uses.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20016>
src/compiler/nir/nir_lower_blend.c