lima/gpir: print acc ops even if we have only one source

floor and sign have only one source, so we need to print acc ops
even if src1 is unused.

Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4110>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4110>
This commit is contained in:
Vasily Khoruzhick 2020-03-10 01:11:11 -07:00 committed by Marge Bot
parent 492ef353fb
commit c78e88e8a6
1 changed files with 2 additions and 4 deletions

View File

@ -398,8 +398,7 @@ print_acc(gpir_codegen_instr *instr, gpir_codegen_instr *prev_instr,
bool printed = false;
const acc_op_info op = acc_op_infos[instr->acc_op];
if (instr->acc0_src0 != gpir_codegen_src_unused &&
instr->acc0_src1 != gpir_codegen_src_unused) {
if (instr->acc0_src0 != gpir_codegen_src_unused) {
printed = true;
printf("\t");
acc_op_info acc0_op = op;
@ -432,8 +431,7 @@ print_acc(gpir_codegen_instr *instr, gpir_codegen_instr *prev_instr,
printf("\n");
}
if (instr->acc1_src0 != gpir_codegen_src_unused &&
instr->acc1_src1 != gpir_codegen_src_unused) {
if (instr->acc1_src0 != gpir_codegen_src_unused) {
printed = true;
printf("\t");
acc_op_info acc1_op = op;