From 97105a15267bacda958264026f4dcf386e0f4cc6 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 19 Sep 2025 12:22:03 -0400 Subject: [PATCH] nir: Consider if uses in nir_def_all_uses_* They check for if uses and want to return false but nir_foreach_use() means the if uses are never seen. Cc: mesa-stable Reviewed-by: Georg Lehmann Reviewed-by: Mel Henning (cherry picked from commit 3f870d62b0eea707c22ca79fa87e4707d40b0c33) Part-of: --- .pick_status.json | 2 +- src/compiler/nir/nir.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c564cf11bbc..01e4358cc84 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3424,7 +3424,7 @@ "description": "nir: Consider if uses in nir_def_all_uses_*", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 2a6d1b856ac..1aa8b7caf02 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -1858,7 +1858,7 @@ nir_def_components_read(const nir_def *def) bool nir_def_all_uses_are_fsat(const nir_def *def) { - nir_foreach_use(src, def) { + nir_foreach_use_including_if(src, def) { if (nir_src_is_if(src)) return false; @@ -1877,7 +1877,7 @@ nir_def_all_uses_are_fsat(const nir_def *def) bool nir_def_all_uses_ignore_sign_bit(const nir_def *def) { - nir_foreach_use(use, def) { + nir_foreach_use_including_if(use, def) { if (nir_src_is_if(use)) return false; nir_instr *instr = nir_src_parent_instr(use);