/* For vector comparisons, use ball etc */
[midgard_alu_op_feq] = UNITS_MOST,
[midgard_alu_op_fne] = UNITS_MOST,
+ [midgard_alu_op_fle] = UNITS_MOST,
[midgard_alu_op_flt] = UNITS_MOST,
[midgard_alu_op_ieq] = UNITS_MOST,
[midgard_alu_op_ine] = UNITS_MOST,
ALU_CASE(b32any_inequal3, ibany_neq);
ALU_CASE(b32any_inequal4, ibany_neq);
- /* For greater-or-equal, we use less-or-equal and flip the
+ /* For greater-or-equal, we lower to less-or-equal and flip the
* arguments */
- case nir_op_ige32: {
- op = midgard_alu_op_ile;
+ case nir_op_fge:
+ case nir_op_fge32:
+ case nir_op_ige32:
+ case nir_op_uge32: {
+ op =
+ instr->op == nir_op_fge ? midgard_alu_op_fle :
+ instr->op == nir_op_fge32 ? midgard_alu_op_fle :
+ instr->op == nir_op_ige32 ? midgard_alu_op_ile :
+ instr->op == nir_op_uge32 ? midgard_alu_op_ule :
+ 0;
/* Swap via temporary */
nir_alu_src temp = instr->src[1];
b = 'b'
algebraic = [
- # TODO: Should really be a fle, maybe not lowered in algebraic?
- (('fge', a, b), ('flt', b, a)),
-
# XXX: We have hw ops for this, just unknown atm..
#(('fsign@32', a), ('i2f32@32', ('isign', ('f2i32@32', ('fmul', a, 0x43800000)))))
#(('fsign', a), ('fcsel', ('fge', a, 0), 1.0, ('fcsel', ('flt', a, 0.0), -1.0, 0.0)))