summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-06-07 17:57:35 -0500
committerJason Ekstrand <[email protected]>2019-07-23 13:40:41 -0500
commit7a98c7804c012b17e86a10d425b9dfa0dfd319b1 (patch)
tree47132bbc9c2f5fdc6d8fd4e1fd3f993c1662cb62 /src/compiler/nir
parent1f4cbc9a060b456a7423be52b8eefa9268a184e5 (diff)
nir: Move nir_alu_instr_is_comparison to the ALU section
Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 15c4cd42571..c6c9e2b5347 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1117,6 +1117,29 @@ nir_ssa_alu_instr_src_components(const nir_alu_instr *instr, unsigned src)
return nir_dest_num_components(instr->dest.dest);
}
+static inline bool
+nir_alu_instr_is_comparison(const nir_alu_instr *instr)
+{
+ switch (instr->op) {
+ case nir_op_flt:
+ case nir_op_fge:
+ case nir_op_feq:
+ case nir_op_fne:
+ case nir_op_ilt:
+ case nir_op_ult:
+ case nir_op_ige:
+ case nir_op_uge:
+ case nir_op_ieq:
+ case nir_op_ine:
+ case nir_op_i2b1:
+ case nir_op_f2b1:
+ case nir_op_inot:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool nir_const_value_negative_equal(nir_const_value c1, nir_const_value c2,
nir_alu_type full_type);
@@ -1760,29 +1783,6 @@ nir_tex_instr_is_query(const nir_tex_instr *instr)
}
}
-static inline bool
-nir_alu_instr_is_comparison(const nir_alu_instr *instr)
-{
- switch (instr->op) {
- case nir_op_flt:
- case nir_op_fge:
- case nir_op_feq:
- case nir_op_fne:
- case nir_op_ilt:
- case nir_op_ult:
- case nir_op_ige:
- case nir_op_uge:
- case nir_op_ieq:
- case nir_op_ine:
- case nir_op_i2b1:
- case nir_op_f2b1:
- case nir_op_inot:
- return true;
- default:
- return false;
- }
-}
-
static inline nir_alu_type
nir_tex_instr_src_type(const nir_tex_instr *instr, unsigned src)
{