[Mesa-dev] [PATCH 24/24] RFC nir/algebraic: Optimize open-coded nir_binop_bfm
mattst88 at gmail.com
Mon Jul 11 22:21:07 UTC 2016
On Wed, Jun 29, 2016 at 2:04 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> BFM is (((1u << a) - 1) << b). Recognize a couple patterns that look
> like this, and replace them with BFM.
> NOTE: Using lower_bitfield_insert is definitely not the right way to
> flag this optimization... so, I'm looking for some advice as to what the
> right way is.
I guess we'll just need another flag to indicate the presence of BFM?
Maybe add a has_bfm flag to nir_shader_compiler_options. It would be
the first has_*, but I can't think of anything better.
And really, maybe has_flrp makes more sense than lower_flrp. The
inverse of former certainly indicates you need to lower it.
That would get a Reviewed-by from me.
More information about the mesa-dev