mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 12:30:11 +01:00
pan/bi: Use builder for IADD -> IADDC opt
As before. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17794>
This commit is contained in:
parent
fd42780337
commit
692a2580eb
1 changed files with 8 additions and 4 deletions
|
|
@ -1293,13 +1293,17 @@ bi_take_instr(bi_context *ctx, struct bi_worklist st,
|
|||
bi_pop_instr(clause, tuple, instr, live_after_temp, fma);
|
||||
|
||||
/* Fixups */
|
||||
bi_builder b = bi_init_builder(ctx, bi_before_instr(instr));
|
||||
|
||||
if (instr->op == BI_OPCODE_IADD_U32 && fma) {
|
||||
assert(bi_can_iaddc(instr));
|
||||
instr->op = BI_OPCODE_IADDC_I32;
|
||||
instr->src[2] = bi_zero();
|
||||
instr->nr_srcs = 3;
|
||||
bi_instr *iaddc =
|
||||
bi_iaddc_i32_to(&b, instr->dest[0], instr->src[0],
|
||||
instr->src[1], bi_zero());
|
||||
|
||||
bi_remove_instruction(instr);
|
||||
instr = iaddc;
|
||||
} else if (fma && bi_can_replace_with_csel(instr)) {
|
||||
bi_builder b = bi_init_builder(ctx, bi_before_instr(instr));
|
||||
bi_instr *csel = bi_csel_from_mux(&b, instr, false);
|
||||
|
||||
bi_remove_instruction(instr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue