bool flip = false, invert = false;
enum bifrost_csel_cond cond =
- bi_cond_to_csel(ins->csel_cond, &flip, &invert, ins->src_types[0]);
+ bi_cond_to_csel(ins->cond, &flip, &invert, ins->src_types[0]);
unsigned size = nir_alu_type_get_type_size(ins->dest_type);
fprintf(fp, "%s", bi_reduce_op_name(ins->op.reduce));
else if (ins->type == BI_FREXP)
fprintf(fp, "%s", bi_frexp_op_name(ins->op.frexp));
- else if (ins->type == BI_CMP)
- fprintf(fp, "%s", bi_cond_name(ins->op.compare));
else
fprintf(fp, "%s", bi_class_name(ins->type));
bi_print_load_vary(&ins->load_vary, fp);
else if (ins->type == BI_BRANCH)
bi_print_branch(&ins->branch, fp);
- else if (ins->type == BI_CSEL)
- fprintf(fp, ".%s", bi_cond_name(ins->csel_cond));
+ else if (ins->type == BI_CSEL || ins->type == BI_CMP)
+ fprintf(fp, ".%s", bi_cond_name(ins->cond));
else if (ins->type == BI_BLEND)
fprintf(fp, ".loc%u", ins->blend_location);
else if (ins->type == BI_TEX)
return;
/* We found one, let's fuse it in */
- csel->csel_cond = bcond;
+ csel->cond = bcond;
bi_copy_src(csel, alu, 0, 0, constants_left, constant_shift, comps);
bi_copy_src(csel, alu, 1, 1, constants_left, constant_shift, comps);
}
BI_CASE_CMP(nir_op_ieq)
BI_CASE_CMP(nir_op_fne)
BI_CASE_CMP(nir_op_ine)
- alu.op.compare = bi_cond_for_nir(instr->op, false);
+ alu.cond = bi_cond_for_nir(instr->op, false);
break;
case nir_op_fround_even:
alu.op.round = BI_ROUND_MODE;
if (alu.type == BI_CSEL) {
/* Default to csel3 */
- alu.csel_cond = BI_COND_NE;
+ alu.cond = BI_COND_NE;
alu.src[1] = BIR_INDEX_ZERO;
alu.src_types[1] = alu.src_types[0];
enum bi_reduce_op reduce;
enum bi_table_op table;
enum bi_frexp_op frexp;
- enum bi_cond compare;
enum bi_tex_op texture;
/* For FMA/ADD, should we add a biased exponent? */
/* For CSEL, the comparison op. BI_COND_ALWAYS doesn't make
* sense here but you can always just use a move for that */
- enum bi_cond csel_cond;
+ enum bi_cond cond;
/* For BLEND -- the location 0-7 */
unsigned blend_location;
}
case BI_CSEL: {
- bool direct = ins->csel_cond == BI_COND_ALWAYS;
+ bool direct = ins->cond == BI_COND_ALWAYS;
bool cond = direct ? srcs[0].u32 :
bit_eval_cond(ins->csel_cond, srcs[0], srcs[1], ins->src_types[0], 0);
ins.src[2] = ins.src[0];
for (enum bi_cond cond = BI_COND_LT; cond <= BI_COND_NE; ++cond) {
- ins.csel_cond = cond;
+ ins.cond = cond;
if (!bit_test_single(dev, &ins, input, true, debug)) {
fprintf(stderr, "FAIL: csel%u.%s\n",