nir: Add nir_const_value_negative_equal

v2: Rebase on 1-bit Boolean changes.

Reviewed-by: Thomas Helland <thomashelland90@gmail.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Ian Romanick
2018-05-24 11:37:51 -07:00
parent ae21b52e1d
commit be1cc3552b
4 changed files with 398 additions and 0 deletions

View File

@@ -988,6 +988,12 @@ nir_ssa_alu_instr_src_components(const nir_alu_instr *instr, unsigned src)
return instr->dest.dest.ssa.num_components;
}
bool nir_const_value_negative_equal(const nir_const_value *c1,
const nir_const_value *c2,
unsigned components,
nir_alu_type base_type,
unsigned bits);
bool nir_alu_srcs_equal(const nir_alu_instr *alu1, const nir_alu_instr *alu2,
unsigned src1, unsigned src2);