Commit 966a455b authored by Samuel Pitoiset's avatar Samuel Pitoiset
Browse files

nir: do not assume that the result of fexp2(a) is always an integral

It's only correct when 'a' is an integral greater or equal to 0.

Fixes: 5544b2cb

 ("nir/algebraic: Use value range analysis to eliminate useless unary ops")
Signed-off-by: Samuel Pitoiset's avatarSamuel Pitoiset <>
Reviewed-by: default avatarIan Romanick <>
parent 6775a524
Pipeline #60462 passed with stages
in 27 minutes and 5 seconds
...@@ -580,6 +580,7 @@ analyze_expression(const nir_alu_instr *instr, unsigned src, ...@@ -580,6 +580,7 @@ analyze_expression(const nir_alu_instr *instr, unsigned src,
r.is_integral = r.is_integral && is_not_negative(r.range);
r.range = table[r.range]; r.range = table[r.range];
break; break;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment