nir/algebraic: Fix a typo in the bit size validation code
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 22 Oct 2018 23:29:52 +0000 (18:29 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 Oct 2018 17:22:29 +0000 (12:22 -0500)
The conon_bit_class and canon_var_class variables got switched.

Fixes: 932c650e0b "nir/algebraic: Loosen a restriction on variables"
Reported-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/nir/nir_algebraic.py

index 4134d496030155d7ee0138b5e9c1b701af20cbf9..17f64625fed3465939bde0031a7b264d2c8251ca 100644 (file)
@@ -362,8 +362,8 @@ class BitSizeValidator(object):
       if var_class == 0:
          self._var_classes[var.index] = bit_class
       else:
-         canon_bit_class = self._class_relation.get_canonical(var_class)
-         canon_var_class = self._class_relation.get_canonical(bit_class)
+         canon_var_class = self._class_relation.get_canonical(var_class)
+         canon_bit_class = self._class_relation.get_canonical(bit_class)
          assert canon_var_class < 0 or canon_bit_class < 0 or \
                 canon_var_class == canon_bit_class, \
                 'Variable {0} cannot be both {1}-bit and {2}-bit' \