nir/algebraic: Allow for flagging operations as being inexact

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
Jason Ekstrand
2016-03-17 11:04:49 -07:00
parent a6f25fa7d7
commit 3a7cb6534c
4 changed files with 26 additions and 2 deletions

View File

@@ -238,6 +238,10 @@ match_expression(const nir_search_expression *expr, nir_alu_instr *instr,
if (instr->op != expr->opcode)
return false;
assert(instr->dest.dest.is_ssa);
if (expr->inexact && instr->exact)
return false;
assert(!instr->dest.saturate);
assert(nir_op_infos[instr->op].num_inputs > 0);