diff options
author | Paulo Zanoni <[email protected]> | 2019-07-10 17:03:48 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-08-12 15:16:23 -0700 |
commit | 9217cf3b5e349f6fb09cfee23f0975398b0f6acb (patch) | |
tree | 61f41bf02c44e6f59691322cf1eaf36b7ee2b527 /src/intel | |
parent | 6ba4717924f2bdf1e77c62f117b4f6b98ea2f75e (diff) |
intel/compiler: invert the logic of lower_integer_multiplication()
Invert the logic of how progress is handled: remove the continue
statements and mark progress inside the places where it actually
happens.
We're going to add a new lowering that also looks for BRW_OPCODE_MUL,
so inverting the logic here makes the resulting code much easier to
follow.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Signed-off-by: Paulo Zanoni <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 3db3332a208..ccf6c955202 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -4062,23 +4062,20 @@ fs_visitor::lower_integer_multiplication() foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { if (inst->opcode == BRW_OPCODE_MUL) { - if (inst->dst.is_accumulator() || - (inst->dst.type != BRW_REGISTER_TYPE_D && - inst->dst.type != BRW_REGISTER_TYPE_UD)) - continue; - - if (devinfo->has_integer_dword_mul) - continue; - - lower_mul_dword_inst(inst, block); + if (!inst->dst.is_accumulator() && + (inst->dst.type == BRW_REGISTER_TYPE_D || + inst->dst.type == BRW_REGISTER_TYPE_UD) && + !devinfo->has_integer_dword_mul) { + lower_mul_dword_inst(inst, block); + inst->remove(block); + progress = true; + } } else if (inst->opcode == SHADER_OPCODE_MULH) { lower_mulh_inst(inst, block); - } else { - continue; + inst->remove(block); + progress = true; } - inst->remove(block); - progress = true; } if (progress) |