nir/algebraic: ldexp flush to zero underflow exponents

Juan A. Suárez requested to merge jasuarez/mesa:review/flush-ldexp into master

The current ldexp lowering implementation works fine for a range of exponents, based on precision. But outside the range, the results can be wrong.

According with GLSL 4.6 specification, section 8.3 ("Common Functions"), regarding ldexp function:

"If exp is less than -126 (single-precision) or -1022 (double-precision), the value returned may be flushed to zero."

So when the exponent is negative and outside the working range, the result is flushed to zero, to avoid giving wrong results.

This fixes dEQP-VK.glsl.builtin.precision*.ldexp.*

Merge request reports