nir/instr_set: Fix multi-slot intrinsic index equality
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

nir_intrinsic_index_size() expects a nir_intrinsic_index_flag, not
the position in the intrinsic's index list.  This could cause
part of a multi-slot index to be ignored.

Fixes: b2bc57551a ("nir/instr_set: allow cse with fp_math_ctrl mismatches for intrinsics")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41593>
This commit is contained in:
Caio Oliveira 2026-05-14 09:45:39 -07:00 committed by Marge Bot
parent 84645c9d8f
commit 0281eb2e98

View file

@ -763,7 +763,7 @@ nir_instrs_equal(const nir_instr *instr1, const nir_instr *instr2)
if (memcmp(&sem1, &sem2, sizeof(sem1)))
return false;
} else {
unsigned size = nir_intrinsic_index_size(i);
unsigned size = nir_intrinsic_index_size(index);
unsigned offset = info->index_map[index] - 1;
if (memcmp(&intrinsic1->const_index[offset],