mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
aco: fix check_vop3_operands() for f16vec2 ffma fneg combine
For v_pk_fma_f16, we should consider all three operands, not the first
two.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 15a375b4c8 ("radv,aco: don't lower some ffma instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14229>
This commit is contained in:
parent
504e5cb4e8
commit
94603786c5
1 changed files with 5 additions and 2 deletions
|
|
@ -3120,8 +3120,11 @@ combine_vop3p(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
ssa_info& info = ctx.info[op.tempId()];
|
||||
if (info.is_vop3p() && info.instr->opcode == aco_opcode::v_pk_mul_f16 &&
|
||||
info.instr->operands[1].constantEquals(0xBC00)) {
|
||||
Operand ops[2] = {instr->operands[!i], info.instr->operands[0]};
|
||||
if (!check_vop3_operands(ctx, 2, ops))
|
||||
Operand ops[3];
|
||||
for (unsigned j = 0; j < instr->operands.size(); j++)
|
||||
ops[j] = instr->operands[j];
|
||||
ops[i] = info.instr->operands[0];
|
||||
if (!check_vop3_operands(ctx, instr->operands.size(), ops))
|
||||
continue;
|
||||
|
||||
VOP3P_instruction* fneg = &info.instr->vop3p();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue