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:
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user