mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
aco: don't combine literals into v_cndmask_b32/v_subb/v_addc
No pipeline-db changes Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Fixes:93c8ebfa('aco: Initial commit of independent AMD compiler') Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> (cherry picked from commitb062b92ab1)
This commit is contained in:
parent
37d13ecca7
commit
ab4df0ec72
1 changed files with 6 additions and 0 deletions
|
|
@ -469,6 +469,12 @@ bool can_accept_constant(aco_ptr<Instruction>& instr, unsigned operand)
|
|||
|
||||
bool valu_can_accept_literal(opt_ctx& ctx, aco_ptr<Instruction>& instr, unsigned operand)
|
||||
{
|
||||
/* instructions like v_cndmask_b32 can't take a literal because they always
|
||||
* read SGPRs */
|
||||
if (instr->operands.size() >= 3 &&
|
||||
instr->operands[2].isTemp() && instr->operands[2].regClass().type() == RegType::sgpr)
|
||||
return false;
|
||||
|
||||
// TODO: VOP3 can take a literal on GFX10
|
||||
return !instr->isSDWA() && !instr->isDPP() && !instr->isVOP3() &&
|
||||
operand == 0 && can_accept_constant(instr, operand);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue