{ "vec4_lrp", IR_LRP, 1, 3 },
{ "vec4_min", IR_MIN, 1, 2 },
{ "vec4_max", IR_MAX, 1, 2 },
+ { "vec4_cmp", IR_CMP, 1, 3 },
{ "vec4_clamp", IR_CLAMP, 1, 3 },
{ "vec4_seq", IR_SEQUAL, 1, 2 },
{ "vec4_sne", IR_SNEQUAL, 1, 2 },
case IR_POW:
/* trinary operators */
case IR_LRP:
+ case IR_CMP:
return emit_arith(emitInfo, n);
case IR_EQUAL:
{ IR_NOISE4, "IR_NOISE4", OPCODE_NOISE4, 1, 1 },
/* other */
+ { IR_CMP, "IR_CMP", OPCODE_CMP, 4, 3 }, /* compare/select */
{ IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 },
{ IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 },
{ IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 },
IR_CLAMP,
IR_MIN,
IR_MAX,
+ IR_CMP, /* = (op0 < 0) ? op1 : op2 */
IR_SEQUAL, /* Set if args are equal (vector) */
IR_SNEQUAL, /* Set if args are not equal (vector) */
IR_SGE, /* Set if greater or equal (vector) */