mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
aco: Ignore instructions with exec operands in follow_operand.
No Foz-DB changes. Signed-off-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18870>
This commit is contained in:
parent
65a3328b4c
commit
7e1d77fd90
1 changed files with 7 additions and 4 deletions
|
|
@ -2113,6 +2113,11 @@ follow_operand(opt_ctx& ctx, Operand op, bool ignore_uses = false)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
for (Operand& operand : instr->operands) {
|
||||
if (fixed_to_exec(operand))
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return instr;
|
||||
}
|
||||
|
||||
|
|
@ -2445,8 +2450,6 @@ match_op3_for_vop3(opt_ctx& ctx, aco_opcode op1, aco_opcode op2, Instruction* op
|
|||
Instruction* op2_instr = follow_operand(ctx, op1_instr->operands[swap]);
|
||||
if (!op2_instr || op2_instr->opcode != op2)
|
||||
return false;
|
||||
if (fixed_to_exec(op2_instr->operands[0]) || fixed_to_exec(op2_instr->operands[1]))
|
||||
return false;
|
||||
|
||||
VOP3_instruction* op1_vop3 = op1_instr->isVOP3() ? &op1_instr->vop3() : NULL;
|
||||
VOP3_instruction* op2_vop3 = op2_instr->isVOP3() ? &op2_instr->vop3() : NULL;
|
||||
|
|
@ -2707,7 +2710,7 @@ combine_salu_n2(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
if (!op2_instr || (op2_instr->opcode != aco_opcode::s_not_b32 &&
|
||||
op2_instr->opcode != aco_opcode::s_not_b64))
|
||||
continue;
|
||||
if (ctx.uses[op2_instr->definitions[1].tempId()] || fixed_to_exec(op2_instr->operands[0]))
|
||||
if (ctx.uses[op2_instr->definitions[1].tempId()])
|
||||
continue;
|
||||
|
||||
if (instr->operands[!i].isLiteral() && op2_instr->operands[0].isLiteral() &&
|
||||
|
|
@ -2744,7 +2747,7 @@ combine_salu_lshl_add(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
if (!op2_instr || op2_instr->opcode != aco_opcode::s_lshl_b32 ||
|
||||
ctx.uses[op2_instr->definitions[1].tempId()])
|
||||
continue;
|
||||
if (!op2_instr->operands[1].isConstant() || fixed_to_exec(op2_instr->operands[0]))
|
||||
if (!op2_instr->operands[1].isConstant())
|
||||
continue;
|
||||
|
||||
uint32_t shift = op2_instr->operands[1].constantValue();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue