summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_search.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-03-17 11:04:49 -0700
committerJason Ekstrand <[email protected]>2016-03-23 16:27:55 -0700
commit3a7cb6534c3f82482c05f6a6813308cf2cad131f (patch)
treeb7a677d183d4674e76ad753e874913a472952dc1 /src/compiler/nir/nir_search.c
parenta6f25fa7d77cbbce113b92690dc43ed2ed9a0211 (diff)
nir/algebraic: Allow for flagging operations as being inexact
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_search.c')
-rw-r--r--src/compiler/nir/nir_search.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c
index 6f6a9425c18..110ab5e2362 100644
--- a/src/compiler/nir/nir_search.c
+++ b/src/compiler/nir/nir_search.c
@@ -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);