intel/compiler: fix release build unused variable.
authorDave Airlie <airlied@redhat.com>
Wed, 3 Jan 2024 06:31:23 +0000 (16:31 +1000)
committerEric Engestrom <eric@engestrom.ch>
Thu, 4 Jan 2024 18:35:59 +0000 (18:35 +0000)
This is only used in an assert.

Fixes: 158ac265dfd0 ("intel/fs: Make helpers for saving/restoring instruction order")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26863>
(cherry picked from commit 37366fef682fbadcfd5d4376008ed0fc5542c8f1)

.pick_status.json
src/intel/compiler/brw_fs.cpp

index eb12e5e..bf94bcb 100644 (file)
         "description": "intel/compiler: fix release build unused variable.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "158ac265dfd0647830e8bca3e7fecc92e7fa421b",
         "notes": null
index 696b5db..aa01a22 100644 (file)
@@ -6834,7 +6834,7 @@ save_instruction_order(const struct cfg_t *cfg)
 static void
 restore_instruction_order(struct cfg_t *cfg, fs_inst **inst_arr)
 {
-   int num_insts = cfg->last_block()->end_ip + 1;
+   ASSERTED int num_insts = cfg->last_block()->end_ip + 1;
 
    int ip = 0;
    foreach_block (block, cfg) {