mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
aco/optimizer: combine v_mul_i32_i24 and add to mad
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28223>
This commit is contained in:
parent
0c57340c23
commit
96ff511b75
1 changed files with 4 additions and 0 deletions
|
|
@ -4523,6 +4523,8 @@ combine_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
} else if (combine_add_bcnt(ctx, instr)) {
|
||||
} else if (combine_three_valu_op(ctx, instr, aco_opcode::v_mul_u32_u24,
|
||||
aco_opcode::v_mad_u32_u24, "120", 1 | 2)) {
|
||||
} else if (combine_three_valu_op(ctx, instr, aco_opcode::v_mul_i32_i24,
|
||||
aco_opcode::v_mad_i32_i24, "120", 1 | 2)) {
|
||||
} else if (ctx.program->gfx_level >= GFX9 && !instr->usesModifiers()) {
|
||||
if (combine_three_valu_op(ctx, instr, aco_opcode::s_xor_b32, aco_opcode::v_xad_u32, "120",
|
||||
1 | 2)) {
|
||||
|
|
@ -4544,6 +4546,8 @@ combine_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
} else if (!carry_out && combine_add_bcnt(ctx, instr)) {
|
||||
} else if (!carry_out && combine_three_valu_op(ctx, instr, aco_opcode::v_mul_u32_u24,
|
||||
aco_opcode::v_mad_u32_u24, "120", 1 | 2)) {
|
||||
} else if (!carry_out && combine_three_valu_op(ctx, instr, aco_opcode::v_mul_i32_i24,
|
||||
aco_opcode::v_mad_i32_i24, "120", 1 | 2)) {
|
||||
} else if (!carry_out && combine_add_lshl(ctx, instr, false)) {
|
||||
}
|
||||
} else if (instr->opcode == aco_opcode::v_sub_u32 || instr->opcode == aco_opcode::v_sub_co_u32 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue