From f2965fde9b334ba5c8f7bbef9d5c25158cfb901d Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 12 Aug 2019 15:47:35 -0700 Subject: [PATCH] nir/range-analysis: Fail gracefully on non-SSA sources Tested-by: Rob Clark Reviewed-by: Eric Anholt --- src/compiler/nir/nir_range_analysis.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_range_analysis.c b/src/compiler/nir/nir_range_analysis.c index 7b908105b98..f9756ef080c 100644 --- a/src/compiler/nir/nir_range_analysis.c +++ b/src/compiler/nir/nir_range_analysis.c @@ -217,6 +217,9 @@ static struct ssa_result_range analyze_expression(const nir_alu_instr *instr, unsigned src, struct hash_table *ht) { + if (!instr->src[src].src.is_ssa) + return (struct ssa_result_range){unknown, false}; + if (nir_src_is_const(instr->src[src].src)) return analyze_constant(instr, src); -- 2.30.2