nir: add lower_bitshift option
authorJonathan Marek <jonathan@marek.ca>
Fri, 31 May 2019 17:54:12 +0000 (13:54 -0400)
committerJonathan Marek <jonathan@marek.ca>
Fri, 31 May 2019 21:35:26 +0000 (21:35 +0000)
commitf889180ee101c2fecd573dd364d91883ccdd30df
tree4b88aee012ea2b289546226cd764ae1f01e1faf5
parent887c2a60923debf0facc4d95554ed87555d83620
nir: add lower_bitshift option

Add a "lower_bitshift" option, which disables optimizations introducing
bitshifts and lowers ishl by constant to a multiply, so that we don't have
to deal with bitshifts in int_to_float lowering.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_algebraic.py
src/gallium/drivers/freedreno/a2xx/ir2_nir.c
src/gallium/drivers/lima/lima_program.c