diff --git a/.pick_status.json b/.pick_status.json index bdaa9be782b..26f6e1dca0f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -454,7 +454,7 @@ "description": "nir/opt_algebraic: Fix mask in shift by constant combining.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0e6581b87dc4e168fa864cd39e8947a58999189a" }, diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 63c2427344f..dcd4c501e4a 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -420,7 +420,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)