From 1fddd2dbebccc79097436b97d65421f424c00463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 22 Apr 2022 01:35:45 -0400 Subject: [PATCH] nir: fix an uninitialized variable valgrind warning in nir_group_loads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pass_flags is only initialized for grouped loads, so change the order Fixes: 33b4eb149ea - nir: add new SSA instruction scheduler grouping loads into indirection groups Reviewed-by: Timur Kristóf Part-of: (cherry picked from commit f7a77ff9005fdb1af7678d80dac6dcf16b328c21) --- .pick_status.json | 2 +- src/compiler/nir/nir_group_loads.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 124b581d033..6f9bbb01f0e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -562,7 +562,7 @@ "description": "nir: fix an uninitialized variable valgrind warning in nir_group_loads", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "33b4eb149ea79d9dd4b80ddda079ad027e5a40bf" }, diff --git a/src/compiler/nir/nir_group_loads.c b/src/compiler/nir/nir_group_loads.c index e290012437c..b9da5c325fb 100644 --- a/src/compiler/nir/nir_group_loads.c +++ b/src/compiler/nir/nir_group_loads.c @@ -428,7 +428,7 @@ process_block(nir_block *block, nir_load_grouping grouping, } /* Only group load instructions with the same indirection level. */ - if (current->pass_flags == level && is_grouped_load(current)) { + if (is_grouped_load(current) && current->pass_flags == level) { nir_instr *current_resource; switch (grouping) {