On Wed, Jun 29, 2016 at 2:04 PM, Ian Romanick <i...@freedesktop.org> wrote: > From: Ian Romanick <ian.d.roman...@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. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev