nir/loop_analyze: Change invert_cond instead of changing the condition
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 15 Feb 2023 00:12:23 +0000 (16:12 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Apr 2023 23:50:27 +0000 (23:50 +0000)
commit99a7a6648de38f79aa06dabad010ec191aae18f4
treef4aed75eeda94c7e349a02a507a0429739fe0ff8
parentaeb8af114153cd4c328e2a0894e6fa166ebb4e4d
nir/loop_analyze: Change invert_cond instead of changing the condition

This ensures that scenarios like
nir_loop_analyze_test.iadd_inot_ilt_rev_known_count_5 don't regress in
the next commit. It also means we don't change float comparisons. These
are probably fine... but it still made me a little uneasy.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3445>
src/compiler/nir/nir_loop_analyze.c
src/compiler/nir/tests/loop_analyze_tests.cpp