nir/loop_analyze: Add basic unit test framework
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 15 Nov 2022 03:07:06 +0000 (19:07 -0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 22 Nov 2022 03:18:54 +0000 (03:18 +0000)
commitdbad33da1697a32e304b75b53a4d4a43eed688bc
tree1a31c775a5e658fbf60b6540ef72da685ba301b4
parentb51eb98cf65566f0f177031a34603ba8068521f8
nir/loop_analyze: Add basic unit test framework

This test comes from a comment in the loop analysis code.

The ine_zero test checks that zero iteration loops involving ine are
correctly identified.

v2: Add ine_zero test. Suggested by Tim.

v3: Rename test cases.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19732>
src/compiler/nir/meson.build
src/compiler/nir/tests/loop_analyze_tests.cpp [new file with mode: 0644]