diff options
author | Jason Ekstrand <[email protected]> | 2018-10-19 10:40:20 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-12-16 21:03:02 +0000 |
commit | 191a1dce92803a99dae774b47264ff32da7b6689 (patch) | |
tree | 10836b4e5f35eb837018ff75487b24cecfe9ce35 /src/compiler/nir/nir_search.c | |
parent | 615cc26b97ad520b90a8d3b3f9bdaa49c78dfda5 (diff) |
nir: Add 1-bit Boolean opcodes
We also have to add support for 1-bit integers while we're here so we
get 1-bit variants of iand, ior, and inot.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Tested-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_search.c')
-rw-r--r-- | src/compiler/nir/nir_search.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index 50f5464cef8..8578ca53c87 100644 --- a/src/compiler/nir/nir_search.c +++ b/src/compiler/nir/nir_search.c @@ -110,7 +110,8 @@ nir_op_matches_search_op(nir_op nop, uint16_t sop) #define MATCH_BCONV_CASE(op) \ case nir_search_op_##op: \ - return nop == nir_op_##op##32; + return nop == nir_op_##op##1 || \ + nop == nir_op_##op##32; switch (sop) { MATCH_FCONV_CASE(i2f) @@ -160,6 +161,7 @@ nir_op_for_search_op(uint16_t sop, unsigned bit_size) #define RET_BCONV_CASE(op) \ case nir_search_op_##op: \ switch (bit_size) { \ + case 1: return nir_op_##op##1; \ case 32: return nir_op_##op##32; \ default: unreachable("Invalid bit size"); \ } |