Commit 3ef013f0 authored by Samuel Pitoiset's avatar Samuel Pitoiset Committed by Dylan Baker

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.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111493
Fixes: 5544b2cb ("nir/algebraic: Use value range analysis to eliminate useless unary ops")
Signed-off-by: Samuel Pitoiset's avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 966a455b)
(conflicts resolved by Dylan Baker)
parent b84cbdfd
Pipeline #61244 passed with stages
in 14 minutes and 14 seconds
......@@ -463,6 +463,7 @@ analyze_expression(const nir_alu_instr *instr, unsigned src,
r = analyze_expression(alu, 0, ht);
r.is_integral = r.is_integral && is_not_negative(r.range);
r.range = table[r.range];
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