From 7fadd864dd8eb12968b86ae8f820718e793ef6e3 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Fri, 10 Jan 2025 09:19:41 -0800 Subject: [PATCH] intel/elk: Fix typo in assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just assert that the array will fit whatever the MAX is for a given Gfx version. Fixes: 172c1ab9847 ("intel/elk: Add ELK_MAX_MRF_ALL for static allocating arrays") Reviewed-by: José Roberto de Souza Part-of: --- src/intel/compiler/elk/elk_fs_reg_allocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/elk/elk_fs_reg_allocate.cpp b/src/intel/compiler/elk/elk_fs_reg_allocate.cpp index ec122b9aaac..f0738b6398d 100644 --- a/src/intel/compiler/elk/elk_fs_reg_allocate.cpp +++ b/src/intel/compiler/elk/elk_fs_reg_allocate.cpp @@ -983,7 +983,7 @@ elk_fs_reg_alloc::spill_reg(unsigned spill_reg) */ if (!fs->spilled_any_registers) { bool mrf_used[ELK_MAX_MRF_ALL]; - assert(ARRAY_SIZE(mrf_used) <= ELK_MAX_MRF(devinfo->ver)); + assert(ARRAY_SIZE(mrf_used) >= ELK_MAX_MRF(devinfo->ver)); get_used_mrfs(fs, mrf_used); for (int i = spill_base_mrf(fs); i < ELK_MAX_MRF(devinfo->ver); i++) {