pan/bi: Optimize pattern from nir_lower_idiv
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 2 Aug 2022 14:16:11 +0000 (10:16 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 19 Aug 2022 20:48:37 +0000 (20:48 +0000)
commit35a7490ce235b472208df8ccedcc37d32dd54c22
tree562140ee07a33a49e3a09fa3cb3a086f00a161d2
parent1ef20f1f3516162bb8f6200f11b53acce2f64315
pan/bi: Optimize pattern from nir_lower_idiv

This takes advantage of the .i1 modifier on the comparison to get b2i32 "for
free" in typical circumstances, saving an instruction. Will help with an instr
count regression from lower_idiv.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17266>
src/panfrost/bifrost/bifrost_nir_algebraic.py