mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-14 05:48:04 +02:00
aco: optimize v_pk_fma_f16 -> v_pk_fmac_f16 on GFX10
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680>
(cherry picked from commit 6ecbccfb23)
This commit is contained in:
parent
4562f9f894
commit
71a58f02e5
2 changed files with 7 additions and 2 deletions
|
|
@ -292,7 +292,7 @@
|
|||
"description": "aco: optimize v_pk_fma_f16 -> v_pk_fmac_f16 on GFX10",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2083,7 +2083,8 @@ void register_allocation(Program *program, std::vector<IDSet>& live_out_per_bloc
|
|||
(instr->opcode == aco_opcode::v_fma_f32 && program->chip_class >= GFX10) ||
|
||||
instr->opcode == aco_opcode::v_mad_f16 ||
|
||||
instr->opcode == aco_opcode::v_mad_legacy_f16 ||
|
||||
(instr->opcode == aco_opcode::v_fma_f16 && program->chip_class >= GFX10)) &&
|
||||
(instr->opcode == aco_opcode::v_fma_f16 && program->chip_class >= GFX10) ||
|
||||
(instr->opcode == aco_opcode::v_pk_fma_f16 && program->chip_class >= GFX10)) &&
|
||||
instr->operands[2].isTemp() &&
|
||||
instr->operands[2].isKillBeforeDef() &&
|
||||
instr->operands[2].getTemp().type() == RegType::vgpr &&
|
||||
|
|
@ -2113,6 +2114,9 @@ void register_allocation(Program *program, std::vector<IDSet>& live_out_per_bloc
|
|||
case aco_opcode::v_fma_f16:
|
||||
instr->opcode = aco_opcode::v_fmac_f16;
|
||||
break;
|
||||
case aco_opcode::v_pk_fma_f16:
|
||||
instr->opcode = aco_opcode::v_pk_fmac_f16;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -2125,6 +2129,7 @@ void register_allocation(Program *program, std::vector<IDSet>& live_out_per_bloc
|
|||
instr->opcode == aco_opcode::v_fmac_f32 ||
|
||||
instr->opcode == aco_opcode::v_mac_f16 ||
|
||||
instr->opcode == aco_opcode::v_fmac_f16 ||
|
||||
instr->opcode == aco_opcode::v_pk_fmac_f16 ||
|
||||
instr->opcode == aco_opcode::v_writelane_b32 ||
|
||||
instr->opcode == aco_opcode::v_writelane_b32_e64) {
|
||||
instr->definitions[0].setFixed(instr->operands[2].physReg());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue