Add inverted bitwise forms to NIR

Submitted by Alyssa Rosenzweig on April 25, 2019, 10:37 p.m.

Details

Reviewer None
Submitted April 25, 2019, 10:37 p.m.
Last Updated April 25, 2019, 10:37 p.m.
Revision 1

Cover Letter(s)

Revision 1
      Various combinations of these instructions are found on many
architectures. They appear directly as-is on Midgard; some of them
should be implementable on Intel Gen8+ via the source modifiers; I was
told over IRC that AMD/Nouveau might have some of these as well. Rather
than forcing backends to grapple with these directly, let's add some new
opcodes to NIR to support them so we can use a proper algebraic pass.

Alyssa Rosenzweig (2):
  nir: Add inverted bitwise ops
  panfrost/midgard: Use inverted forms

 src/compiler/nir/nir.h                         |  4 ++++
 src/compiler/nir/nir_opcodes.py                | 18 ++++++++++++++++++
 src/compiler/nir/nir_opt_algebraic.py          | 12 ++++++++++++
 .../drivers/panfrost/midgard/midgard_compile.c |  5 +++++
 .../drivers/panfrost/midgard/midgard_compile.h |  5 ++++-
 5 files changed, 43 insertions(+), 1 deletion(-)
    

Revisions