Foz-DB Navi21:
Totals from 1223 (0.91% of 134864) affected shaders:
CodeSize: 6923888 -> 6913516 (-0.15%)
Instrs: 1293744 -> 1291151 (-0.20%)
Latency:
16928653 ->
16925035 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 2985304 -> 2984775 (-0.02%); split: -0.02%, +0.00%
VClause: 32260 -> 32319 (+0.18%)
SClause: 54952 -> 54949 (-0.01%)
Copies: 83968 -> 81377 (-3.09%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22821>
/* Check if the operand is written by p_split_vector. */
Instruction* split_vec = ctx.get(op_instr_idx);
- if (split_vec->opcode != aco_opcode::p_split_vector)
+ if (split_vec->opcode != aco_opcode::p_split_vector &&
+ split_vec->opcode != aco_opcode::p_extract_vector)
continue;
Operand& split_op = split_vec->operands[0];
continue;
PhysReg reg = split_op.physReg();
+ if (split_vec->opcode == aco_opcode::p_extract_vector) {
+ reg =
+ reg.advance(split_vec->definitions[0].bytes() * split_vec->operands[1].constantValue());
+ }
for (Definition& def : split_vec->definitions) {
if (def.getTemp() != op.getTemp()) {
reg = reg.advance(def.bytes());