diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index d0873b0e1aa..222727d4f2a 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -413,7 +413,7 @@ optimizations.extend([ # bits of the second source. These replacements must correctly handle the # case where (b % bitsize) + (c % bitsize) >= bitsize. for s in [8, 16, 32, 64]: - mask = (1 << s) - 1 + mask = s - 1 ishl = "ishl@{}".format(s) ishr = "ishr@{}".format(s)