nir: add unsigned upper bound support for fsat

Foz-DB Navi21:
Totals from 89 (0.11% of 79395) affected shaders:
Instrs: 97018 -> 96995 (-0.02%)
CodeSize: 492996 -> 492488 (-0.10%)
Latency: 504649 -> 504555 (-0.02%)
InvThroughput: 121968 -> 121875 (-0.08%)
VALU: 67427 -> 67404 (-0.03%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32565>
This commit is contained in:
Georg Lehmann 2024-12-09 22:47:51 +01:00 committed by Marge Bot
parent e78e63e3fe
commit e8b29abb25

View file

@ -1737,6 +1737,7 @@ get_alu_uub(struct analysis_state *state, struct uub_query q, uint32_t *result,
return;
}
break;
case nir_op_fsat:
case nir_op_fmul:
case nir_op_fmulz:
case nir_op_f2u32:
@ -1860,6 +1861,9 @@ get_alu_uub(struct analysis_state *state, struct uub_query q, uint32_t *result,
memcpy(result, &max_f, 4);
}
break;
case nir_op_fsat:
*result = 0x3f800000u;
break;
case nir_op_u2u1:
case nir_op_u2u8:
case nir_op_u2u16: