diff options
author | Ian Romanick <[email protected]> | 2019-08-12 15:47:35 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2019-08-14 09:02:38 -0700 |
commit | f2965fde9b334ba5c8f7bbef9d5c25158cfb901d (patch) | |
tree | e40c4165e6375770dd942c8b24757d08a1af823a /src/compiler | |
parent | 1290cc3e27d32ef1b9dc4902c2276ee46a0b7862 (diff) |
nir/range-analysis: Fail gracefully on non-SSA sources
Tested-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_range_analysis.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |