summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_search_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_search_helpers.h')
-rw-r--r--src/compiler/nir/nir_search_helpers.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_search_helpers.h b/src/compiler/nir/nir_search_helpers.h
index 89f1cba5c52..456de81e175 100644
--- a/src/compiler/nir/nir_search_helpers.h
+++ b/src/compiler/nir/nir_search_helpers.h
@@ -155,6 +155,12 @@ is_used_once(nir_alu_instr *instr)
}
static inline bool
+is_used_by_if(nir_alu_instr *instr)
+{
+ return !list_empty(&instr->dest.dest.ssa.if_uses);
+}
+
+static inline bool
is_not_used_by_if(nir_alu_instr *instr)
{
return list_empty(&instr->dest.dest.ssa.if_uses);