nir/builder: Emit better code for iadd/imul_imm
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 6 Mar 2019 18:27:26 +0000 (12:27 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 7 Mar 2019 21:20:30 +0000 (21:20 +0000)
commitcd4c1458baba595aaff25ca1099c60a57d31772b
tree48a983ba94a95c432c7f6840c7c57517b43bfdcd
parentebbb6b8eaa06c0eac93fee689223c6a98d3f98bc
nir/builder: Emit better code for iadd/imul_imm

Because we already know the immediate right-hand parameter, we can
potentially save the optimizer a bit of work.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/nir/nir_builder.h
src/compiler/spirv/vtn_variables.c