nir: Add unit tests for nir_opt_comparison_pre
Each tests has a comment with the expected before and after NIR. The tests don't actually check this. The tests only check whether or not the optimization pass reported progress. I couldn't think of a robust, future-proof way to check the before and after code. Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
@@ -3625,6 +3625,9 @@ bool nir_lower_phis_to_regs_block(nir_block *block);
|
||||
bool nir_lower_ssa_defs_to_regs_block(nir_block *block);
|
||||
bool nir_rematerialize_derefs_in_use_blocks_impl(nir_function_impl *impl);
|
||||
|
||||
/* This is here for unit tests. */
|
||||
bool nir_opt_comparison_pre_impl(nir_function_impl *impl);
|
||||
|
||||
bool nir_opt_comparison_pre(nir_shader *shader);
|
||||
|
||||
bool nir_opt_algebraic(nir_shader *shader);
|
||||
|
Reference in New Issue
Block a user