aco: support s_bitset

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/40889>
This commit is contained in:
Rhys Perry 2025-11-26 14:09:22 +00:00 committed by Marge Bot
parent 6a2ac18b2b
commit 88dcda1078
2 changed files with 11 additions and 0 deletions

View file

@ -1528,6 +1528,11 @@ get_tied_defs(Instruction* instr)
/* VADDR starts at 3. */
ops.push_back(3 + 4);
ops.push_back(3 + 7);
} else if (instr->opcode == aco_opcode::s_bitset0_b32 ||
instr->opcode == aco_opcode::s_bitset1_b32 ||
instr->opcode == aco_opcode::s_bitset0_b64 ||
instr->opcode == aco_opcode::s_bitset1_b64) {
ops.push_back(1);
}
return ops;
}

View file

@ -1180,6 +1180,12 @@ alu_opt_info_is_valid(opt_ctx& ctx, alu_opt_info& info)
lmask[2] = true;
info.opcode = aco_opcode::s_fmaak_f32;
}
} else if ((info.opcode == aco_opcode::s_bitset0_b32 ||
info.opcode == aco_opcode::s_bitset1_b32 ||
info.opcode == aco_opcode::s_bitset0_b64 ||
info.opcode == aco_opcode::s_bitset1_b64) &&
!smask[1]) {
return false;
}
if ((info.opcode == aco_opcode::s_fmac_f16 || info.opcode == aco_opcode::s_fmac_f32) &&