mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
intel/fs: Don't lower integer multiplies that don't need lowering
v2: Move the check to fs_visitor::lower_integer_multiplication. Previously the cases where lowering was skipped, the original instruction was removed by fs_visitor::lower_integer_multiplication. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
This commit is contained in:
parent
db649fd582
commit
74cd0964d6
1 changed files with 11 additions and 0 deletions
|
|
@ -4107,6 +4107,17 @@ fs_visitor::lower_integer_multiplication()
|
|||
|
||||
foreach_block_and_inst_safe(block, fs_inst, inst, cfg) {
|
||||
if (inst->opcode == BRW_OPCODE_MUL) {
|
||||
/* If the instruction is already in a form that does not need lowering,
|
||||
* return early.
|
||||
*/
|
||||
if (devinfo->gen >= 7) {
|
||||
if (type_sz(inst->src[1].type) < 4 && type_sz(inst->src[0].type) <= 4)
|
||||
continue;
|
||||
} else {
|
||||
if (type_sz(inst->src[0].type) < 4 && type_sz(inst->src[1].type) <= 4)
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((inst->dst.type == BRW_REGISTER_TYPE_Q ||
|
||||
inst->dst.type == BRW_REGISTER_TYPE_UQ) &&
|
||||
(inst->src[0].type == BRW_REGISTER_TYPE_Q ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue