gallivm: Use range analysis to generate better fmin and fmax code
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 28 Apr 2021 22:41:56 +0000 (15:41 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 4 May 2021 00:13:34 +0000 (00:13 +0000)
commitaaeff52bbe75f49f5a94eea8b777659f3ec4d555
tree66f822b05096b0c3a9adfeaf6114b26064ddf9ff
parentb3f3287eac066eae16dce0e47aad3229dcff8257
gallivm: Use range analysis to generate better fmin and fmax code

If it is known that one of the source must be a number, then the (more
efficient) GALLIVM_NAN_RETURN_OTHER_SECOND_NONNAN path can be used.

v2: s/know to be/known to be/.  Noticed by Roland.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10532>
src/gallium/auxiliary/gallivm/lp_bld_nir.c
src/gallium/auxiliary/gallivm/lp_bld_nir.h