ir3/merge_regs: fix merge set alignment check

b_offset should be checked against b's alignment, not a's.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35858>
This commit is contained in:
Job Noorman 2025-07-03 17:09:25 +02:00 committed by Marge Bot
parent 60eebe964d
commit 28e810eb74

View file

@ -245,7 +245,7 @@ merge_sets_interfere(struct ir3_liveness *live, struct ir3_merge_set *a,
int dom_index = -1;
/* Reject trying to merge the sets if the alignment doesn't work out */
if (b_offset % a->alignment != 0)
if ((a->alignment + b_offset) % b->alignment != 0)
return true;
while (a_index < a->regs_count || b_index < b->regs_count) {