glsl/softfp64: Add fisfinite lowering.

This is generated by nir_lower_frexp, and if we leave fisfinite in place
then the late algebraic pass lowering it to this pattern will cause an
un-lowered fabs64 to be emitted.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22083>
This commit is contained in:
Emma Anholt 2023-03-23 12:14:05 -07:00 committed by Marge Bot
parent 7ff899dd6e
commit 261c1f9ee1
2 changed files with 11 additions and 0 deletions

View file

@ -1716,3 +1716,9 @@ __ffract64(uint64_t a)
{
return __fadd64(a, __fneg64(__ffloor64(a)));
}
bool
__fisfinite64(uint64_t __a)
{
return __extractFloat64Exp(__a) != 0x7ff;
}

View file

@ -600,6 +600,11 @@ lower_doubles_instr_to_soft(nir_builder *b, nir_alu_instr *instr,
name = "__fsat64";
mangled_name = "__fsat64(u641;";
break;
case nir_op_fisfinite:
name = "__fisfinite64";
mangled_name = "__fisfinite64(u641;";
return_type = glsl_bool_type();
break;
default:
return false;
}