nir: add amul instruction
authorRob Clark <robdclark@chromium.org>
Thu, 26 Sep 2019 17:32:00 +0000 (10:32 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 18 Oct 2019 22:08:54 +0000 (15:08 -0700)
commit6320e37d4be16407cd237c2049a46360405599d5
tree7ab211ba6ac99da320f6586f19ed068adb11637f
parent0568761f8e7b9249ec8cffbd7826c24e38bf16d6
nir: add amul instruction

Used for address/offset calculation (ie. array derefs), where we can
potentially use less than 32b for the multiply of array idx by element
size.  For backends that support `imul24`, this gives a lowering pass
an easy way to find multiplies that potentially can be converted to
`imul24`.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/compiler/glsl/gl_nir_lower_buffers.c
src/compiler/nir/nir_builder.h
src/compiler/nir/nir_deref.c
src/compiler/nir/nir_lower_io.c
src/compiler/nir/nir_lower_io_to_vector.c
src/compiler/nir/nir_opcodes.py
src/compiler/nir/nir_opt_algebraic.py