From dca6cd9ce65100896976e913bf72c2c68ea4e1a7 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 7 Nov 2018 13:43:40 -0600 Subject: nir: Make boolean conversions sized just like the others Instead of a single i2b and b2i, we now have i2b32 and b2iN where N is one if 8, 16, 32, or 64. This leads to having a few more opcodes but now everything is consistent and booleans aren't a weird special case anymore. Reviewed-by: Connor Abbott --- src/compiler/nir/nir_algebraic.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/compiler/nir/nir_algebraic.py') diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index 66ee0ad6402..c16cadbdc58 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -45,6 +45,10 @@ conv_opcode_types = { 'f2i' : 'int', 'u2u' : 'uint', 'i2i' : 'int', + 'b2f' : 'float', + 'b2i' : 'int', + 'i2b' : 'bool', + 'f2b' : 'bool', } if sys.version_info < (3, 0): -- cgit v1.2.3