mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
aco: shrink code size of some p_extract
fossil-db (navi21): Totals from 37 (0.05% of 79395) affected shaders: CodeSize: 2048204 -> 2047836 (-0.02%) fossil-db (navi31): Totals from 307 (0.39% of 79395) affected shaders: CodeSize: 3075732 -> 3065236 (-0.34%); split: -0.34%, +0.00% Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31762>
This commit is contained in:
parent
d285333800
commit
e47bc3e750
1 changed files with 5 additions and 1 deletions
|
|
@ -2544,7 +2544,11 @@ lower_to_hw_instr(Program* program)
|
|||
bld.sop2(signext ? aco_opcode::s_bfe_i32 : aco_opcode::s_bfe_u32, dst,
|
||||
instr->definitions[1], op, Operand::c32((bits << 16) | offset));
|
||||
}
|
||||
} else if (dst.regClass() == v1 && op.physReg().byte() == 0) {
|
||||
} else if (dst.regClass() == v1) {
|
||||
if (op.physReg().byte()) {
|
||||
offset += op.physReg().byte() * 8;
|
||||
op = Operand(PhysReg(op.physReg().reg()), v1);
|
||||
}
|
||||
assert(op.physReg().byte() == 0 && dst.physReg().byte() == 0);
|
||||
if (offset == (32 - bits) && op.regClass() != s1) {
|
||||
bld.vop2(signext ? aco_opcode::v_ashrrev_i32 : aco_opcode::v_lshrrev_b32, dst,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue