From 11334c438a48f63ee2b2fb63388fd52fc77d385a Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Wed, 10 Jun 2026 12:21:49 +0200 Subject: [PATCH] ir3: fix possible signed overflow in ir3_link_add `1 << 31` is undefined since `1` is a signed integer. Signed-off-by: Job Noorman Fixes: 1f9839907a8 ("ir3: Skip missing VS outputs in VS out map when linking") Part-of: --- src/freedreno/ir3/ir3_shader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index 89fc8f84a6a..85ac86b49fb 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -1353,7 +1353,7 @@ ir3_link_add(struct ir3_shader_linkage *l, uint8_t slot, uint8_t regid_, { for (unsigned j = 0; j < util_last_bit(compmask); j++) { uint8_t comploc = loc + j; - l->varmask[comploc / 32] |= 1 << (comploc % 32); + l->varmask[comploc / 32] |= UINT32_C(1) << (comploc % 32); } l->max_loc = MAX2(l->max_loc, loc + util_last_bit(compmask));