From d9a841d799ce47a7556e4c72726b89586283779e Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 8 Jan 2025 12:32:37 +0000 Subject: [PATCH] aco/util: fix bit_reference::operator&= Signed-off-by: Rhys Perry Reviewed-by: Georg Lehmann Backport-to: 24.3 (cherry picked from commit 46787fc2d0f779d287ed78e11a48a1f8e82b7aa6) Part-of: --- .pick_status.json | 2 +- src/amd/compiler/aco_util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 222bf95fdf6..1db72e56bcb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1204,7 +1204,7 @@ "description": "aco/util: fix bit_reference::operator&=", "nominated": true, "nomination_type": 4, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/compiler/aco_util.h b/src/amd/compiler/aco_util.h index 68a6c686408..2b43d13a14b 100644 --- a/src/amd/compiler/aco_util.h +++ b/src/amd/compiler/aco_util.h @@ -793,7 +793,7 @@ template struct bit_reference { constexpr bit_reference& operator&=(bool val) { - storage &= T(val) << bit; + storage &= ~(T(!val) << bit); return *this; }