aco: use VOPC_SDWA on GFX9+
Totals from 5138 (3.42% of 150170) affected shaders: (GFX10.3) VGPRs: 409520 -> 409416 (-0.03%); split: -0.03%, +0.00% CodeSize: 43056360 -> 43035696 (-0.05%); split: -0.06%, +0.02% MaxWaves: 69296 -> 69310 (+0.02%) Instrs: 8161016 -> 8153365 (-0.09%); split: -0.10%, +0.01% Latency: 109397002 -> 109756208 (+0.33%); split: -0.05%, +0.38% InvThroughput: 23238920 -> 23310761 (+0.31%); split: -0.11%, +0.42% VClause: 135141 -> 135100 (-0.03%); split: -0.05%, +0.02% SClause: 349511 -> 349489 (-0.01%); split: -0.01%, +0.00% Copies: 388107 -> 387754 (-0.09%); split: -0.48%, +0.38% Branches: 184629 -> 184503 (-0.07%); split: -0.08%, +0.01% PreSGPRs: 258807 -> 258839 (+0.01%) PreVGPRs: 372561 -> 372184 (-0.10%); split: -0.10%, +0.00% Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12364>
This commit is contained in:
parent
60e171af06
commit
3d6ca41e44
|
@ -197,7 +197,7 @@ can_use_SDWA(chip_class chip, const aco_ptr<Instruction>& instr, bool pre_ra)
|
|||
VOP3_instruction& vop3 = instr->vop3();
|
||||
if (instr->format == Format::VOP3)
|
||||
return false;
|
||||
if (vop3.clamp && instr->format == asVOP3(Format::VOPC) && chip != GFX8)
|
||||
if (vop3.clamp && instr->isVOPC() && chip != GFX8)
|
||||
return false;
|
||||
if (vop3.omod && chip < GFX9)
|
||||
return false;
|
||||
|
@ -214,7 +214,7 @@ can_use_SDWA(chip_class chip, const aco_ptr<Instruction>& instr, bool pre_ra)
|
|||
}
|
||||
}
|
||||
|
||||
if (!instr->definitions.empty() && instr->definitions[0].bytes() > 4)
|
||||
if (!instr->definitions.empty() && instr->definitions[0].bytes() > 4 && !instr->isVOPC())
|
||||
return false;
|
||||
|
||||
if (!instr->operands.empty()) {
|
||||
|
@ -235,7 +235,7 @@ can_use_SDWA(chip_class chip, const aco_ptr<Instruction>& instr, bool pre_ra)
|
|||
return false;
|
||||
|
||||
// TODO: return true if we know we will use vcc
|
||||
if (!pre_ra && instr->isVOPC())
|
||||
if (!pre_ra && instr->isVOPC() && chip == GFX8)
|
||||
return false;
|
||||
if (!pre_ra && instr->operands.size() >= 3 && !is_mac)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue