nir/validate: Use unlikely for validate_assert

No apparent performance difference, but documents the intention.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
This commit is contained in:
Alyssa Rosenzweig 2023-11-06 17:06:06 -04:00
parent e9d185dccf
commit d2b1e6bed0

View file

@ -112,7 +112,7 @@ static bool
validate_assert_impl(validate_state *state, bool cond, const char *str,
const char *file, unsigned line)
{
if (!cond)
if (unlikely(!cond))
log_error(state, str, file, line);
return cond;
}