Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16296>
return;
}
+ /* The accumulation operand of dot product instructions ignores opsel. */
+ bool cannot_use_opsel =
+ (instr->opcode == aco_opcode::v_dot4_i32_i8 || instr->opcode == aco_opcode::v_dot2_i32_i16 ||
+ instr->opcode == aco_opcode::v_dot4_u32_u8 || instr->opcode == aco_opcode::v_dot2_u32_u16) &&
+ i == 2;
+ if (cannot_use_opsel)
+ return;
+
/* try to fold inline constants */
VOP3P_instruction* vop3p = &instr->vop3p();
/* TODO: if bits==32, we might be able to get an inline constant if we sign-extend or shift left