emit(ir, OPCODE_LRP, result_dst, op[2], op[1], op[0]);
break;
+ case ir_triop_csel:
+ /* We assume that boolean true and false are 1.0 and 0.0. OPCODE_CMP
+ * selects src1 if src0 is < 0, src2 otherwise.
+ */
+ op[0].negate = ~op[0].negate;
+ emit(ir, OPCODE_CMP, result_dst, op[0], op[1], op[2]);
+ break;
+
case ir_binop_vector_extract:
case ir_triop_fma:
case ir_triop_bitfield_extract:
case ir_triop_vector_insert:
case ir_quadop_bitfield_insert:
case ir_binop_ldexp:
- case ir_triop_csel:
case ir_binop_carry:
case ir_binop_borrow:
case ir_binop_imul_high: