nir: Add support for 2src_commutative ops that have 3 sources
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 9 May 2019 22:33:11 +0000 (15:33 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 14 May 2019 18:25:02 +0000 (11:25 -0700)
commite049a9c92b3048f2d28d5a36f0dd780b19fe4b2a
tree1698453d02403c25074c998e815585669ed2c2c0
parentede45bf9cfe20578712ae874f7a3d18fd86a1297
nir: Add support for 2src_commutative ops that have 3 sources

v2: Instead of handling 3 sources as a special case, generalize with
loops to N sources.  Suggested by Jason.

v3: Further generalize by only checking that number of sources is >= 2.
Suggested by Jason.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_algebraic.py
src/compiler/nir/nir_instr_set.c
src/compiler/nir/nir_search.c