mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-21 01:38:23 +02:00
aco/ra: fix inline constants with v_dot2c_f32_f16
Unlike for v_pk_fmac_f16 and v_dual_dot2acc_f32_f16, opsel_hi is
implicitly true even for inline constants operands of v_dot2c_f32_f16 on GFX11.
Fixes: 3238e64d3c ("aco/ra: create v_dot2c_f32_f16")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42151>
This commit is contained in:
parent
3a8360b2ac
commit
3f2759af6c
1 changed files with 5 additions and 2 deletions
|
|
@ -2988,6 +2988,10 @@ vop3_can_use_vop2acc(ra_ctx& ctx, Instruction* instr)
|
|||
return false;
|
||||
|
||||
if (instr->isVOP3P()) {
|
||||
/* opsel_hi is implicitly 1 except for inline constant operands of v_pk_fmac_f16 on gfx11+ */
|
||||
bool inline_implicit_opsel_hi =
|
||||
instr->opcode != aco_opcode::v_pk_fma_f16 || ctx.program->gfx_level < GFX11;
|
||||
|
||||
for (unsigned i = 0; i < 3; i++) {
|
||||
if (instr->operands[i].isLiteral())
|
||||
continue;
|
||||
|
|
@ -2995,9 +2999,8 @@ vop3_can_use_vop2acc(ra_ctx& ctx, Instruction* instr)
|
|||
if (instr->valu().opsel_lo[i])
|
||||
return false;
|
||||
|
||||
/* v_pk_fmac_f16 inline constants are replicated to hi bits starting with gfx11. */
|
||||
if (instr->valu().opsel_hi[i] ==
|
||||
(instr->operands[i].isConstant() && ctx.program->gfx_level >= GFX11))
|
||||
(instr->operands[i].isConstant() && !inline_implicit_opsel_hi))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue