case ir_unop_exp2: result = nir_fexp2(&b, srcs[0]); break;
case ir_unop_log2: result = nir_flog2(&b, srcs[0]); break;
case ir_unop_i2f:
- result = nir_i2f32(&b, srcs[0]);
- break;
case ir_unop_u2f:
- result = nir_u2f32(&b, srcs[0]);
- break;
case ir_unop_b2f:
- result = nir_b2f32(&b, srcs[0]);
- break;
case ir_unop_f2i:
- result = nir_f2i32(&b, srcs[0]);
- break;
case ir_unop_f2u:
- result = nir_f2u32(&b, srcs[0]);
- break;
case ir_unop_f2b:
case ir_unop_i2b:
case ir_unop_b2i:
ptn_move_dest_masked(b, dest, nir_imm_float(b, 1.0), WRITEMASK_W);
}
-/**
- * Emit SLT. For platforms with integers, prefer b2f(flt(...)).
- */
static void
ptn_slt(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- ptn_move_dest(b, dest, nir_b2f32(b, nir_flt(b, src[0], src[1])));
+ ptn_move_dest(b, dest, nir_slt(b, src[0], src[1]));
}
-/**
- * Emit SGE. For platforms with integers, prefer b2f(fge(...)).
- */
static void
ptn_sge(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- ptn_move_dest(b, dest, nir_b2f32(b, nir_fge(b, src[0], src[1])));
+ ptn_move_dest(b, dest, nir_sge(b, src[0], src[1]));
}
static void