summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_validate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index 9f8455d21cc..df1e7b33004 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -493,6 +493,12 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state)
* pointers should be.
*/
validate_dest(&instr->dest, state, 0, 0);
+
+ /* Deref instructions as if conditions don't make sense because if
+ * conditions expect well-formed Booleans. If you want to compare with
+ * NULL, an explicit comparison operation should be used.
+ */
+ validate_assert(state, list_empty(&instr->dest.ssa.if_uses));
}
static void