Otherwise, the compiler overwrites s0 which contains the exec mask.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4494>
bool need_sitmp = (program->chip_class <= GFX7 || program->chip_class >= GFX10) && instr->opcode != aco_opcode::p_reduce;
if (instr->opcode == aco_opcode::p_exclusive_scan) {
need_sitmp |=
- (op == imin32 || op == imin64 || op == imax32 || op == imax64 ||
- op == fmin32 || op == fmin64 || op == fmax32 || op == fmax64 ||
- op == fmul64);
+ (op == imin8 || op == imin16 || op == imin32 || op == imin64 ||
+ op == imax8 || op == imax16 || op == imax32 || op == imax64 ||
+ op == fmin16 || op == fmin32 || op == fmin64 ||
+ op == fmax16 || op == fmax32 || op == fmax64 ||
+ op == fmul16 || op == fmul64);
}
if (need_sitmp) {
instr->definitions[2] = bld.def(RegClass(RegType::sgpr, instr->operands[0].size()));