mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 05:00:09 +01:00
nir/algebraic: Loosen a restriction on variables
Previously, we would fail if a variable had an assigned but unknown bit size X and we tried to assign it an actual bit size. However, this is ok because, at the time we do the search, the variable does have an actual bit size and it will match X because of the NIR rules. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
parent
ea9e651423
commit
932c650e0b
1 changed files with 6 additions and 2 deletions
|
|
@ -352,8 +352,12 @@ class BitSizeValidator(object):
|
|||
if var_class == 0:
|
||||
self._var_classes[var.index] = bit_class
|
||||
else:
|
||||
canon_class = self._class_relation.get_canonical(var_class)
|
||||
assert canon_class < 0 or canon_class == bit_class
|
||||
canon_bit_class = self._class_relation.get_canonical(var_class)
|
||||
canon_var_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' \
|
||||
.format(str(var), bit_class, var_class)
|
||||
var_class = self._class_relation.add_equiv(var_class, bit_class)
|
||||
self._var_classes[var.index] = var_class
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue