mesa/src/compiler/nir/tests
Ian Romanick 9342c14eeb nir/builder: Emit x != 0 for nir_i2b
There are a lot of optimizations in opt_algebraic that match ('ine', a,
0), but there are almost none that match i2b.  Instead of adding a huge
pile of additional patterns (including variation that include both ine
and i2b), just emit a != 0 instead of i2b(a).

I think that the changes to the unit tests weaken them slightly, but
perhaps that's okay?

No shader-db changes on any Intel platform.  The GLSL paths use other
means to generate i2b operations, but the SPIR-V paths use nir_i2b.
Presumably since 4676b3d3dd (nir: Use nir_test_mask instead of
i2b(iand)), no fossil-db changes either.

v2: Use nir_ine_imm.  Suggested by Jesse.

Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15121>
2022-12-14 06:23:21 +00:00
..
algebraic_parser_test.py nir/algebraic: Move relocations for expression conds to a table. 2021-12-07 07:09:00 +00:00
algebraic_tests.cpp nir/tests: add tests for umod/imod/irem optimizations 2021-08-09 11:00:39 +00:00
builder_tests.cpp nir/builder: Add a name format arg to nir_builder_init_simple_shader(). 2020-11-11 08:50:29 -08:00
comparison_pre_tests.cpp nir/builder: Add a name format arg to nir_builder_init_simple_shader(). 2020-11-11 08:50:29 -08:00
control_flow_tests.cpp nir/builder: Add a name format arg to nir_builder_init_simple_shader(). 2020-11-11 08:50:29 -08:00
core_tests.cpp nir/tests: do not use designated initializers in c++ code 2022-04-05 16:58:56 +00:00
dce_tests.cpp nir/tests: add DCE test for loops following a jump 2021-11-29 22:22:24 +00:00
load_store_vectorizer_tests.cpp nir/builder: Emit x != 0 for nir_i2b 2022-12-14 06:23:21 +00:00
loop_analyze_tests.cpp nir/loop_analyze: Fix get_iteration for nir_op_fneu 2022-11-22 03:18:54 +00:00
lower_returns_tests.cpp nir: Move phi src setup to a helper. 2021-08-13 16:11:57 +00:00
negative_equal_tests.cpp nir/tests: Fix transmuting an SSA dest to be non-SSA 2021-09-14 17:53:06 +00:00
opt_if_tests.cpp nir: add a nir_opt_if_options enum 2022-08-10 12:55:39 +00:00
serialize_tests.cpp nir: Fixes [-Wdeprecated-declarations] in serialize_tests.cpp 2022-08-23 15:19:16 +00:00
ssa_def_bits_used_tests.cpp nir/range_analysis: Handle vectors better in ssa_def_bits_used 2021-02-22 22:37:17 +00:00
vars_tests.cpp nir: Fix unused-variable compile warnings 2022-06-15 19:43:27 +00:00