diff options
-rw-r--r-- | src/panfrost/bifrost/bi_pack.c | 2 | ||||
-rw-r--r-- | src/panfrost/bifrost/bi_print.c | 6 | ||||
-rw-r--r-- | src/panfrost/bifrost/bifrost_compile.c | 6 | ||||
-rw-r--r-- | src/panfrost/bifrost/compiler.h | 3 | ||||
-rw-r--r-- | src/panfrost/bifrost/test/bi_interpret.c | 2 | ||||
-rw-r--r-- | src/panfrost/bifrost/test/bi_test_pack.c | 2 |
6 files changed, 9 insertions, 12 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index 5ae911e3548..af5193949f8 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -772,7 +772,7 @@ bi_pack_fma_csel(bi_instruction *ins, struct bi_registers *regs) 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); diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index aff319791e0..b1ecc662ada 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -362,8 +362,6 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) 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)); @@ -376,8 +374,8 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) 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) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 5dfe12d0a55..a23a6121cce 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -533,7 +533,7 @@ bi_fuse_csel_cond(bi_instruction *csel, nir_alu_src cond, 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); } @@ -636,7 +636,7 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr) 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; @@ -660,7 +660,7 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr) 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]; diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index b18232e5846..4b3d1c68e51 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -278,7 +278,6 @@ typedef struct { 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? */ @@ -293,7 +292,7 @@ typedef struct { /* 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; diff --git a/src/panfrost/bifrost/test/bi_interpret.c b/src/panfrost/bifrost/test/bi_interpret.c index 449770bf833..609a0c7eede 100644 --- a/src/panfrost/bifrost/test/bi_interpret.c +++ b/src/panfrost/bifrost/test/bi_interpret.c @@ -433,7 +433,7 @@ bit_step(struct bit_state *s, bi_instruction *ins, bool FMA) } 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); diff --git a/src/panfrost/bifrost/test/bi_test_pack.c b/src/panfrost/bifrost/test/bi_test_pack.c index a4d86855eb9..969bd058324 100644 --- a/src/panfrost/bifrost/test/bi_test_pack.c +++ b/src/panfrost/bifrost/test/bi_test_pack.c @@ -285,7 +285,7 @@ bit_csel_helper(struct panfrost_device *dev, 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", |