lima/gpir: print acc ops even if we have only one source
authorVasily Khoruzhick <anarsoul@gmail.com>
Tue, 10 Mar 2020 08:11:11 +0000 (01:11 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Mar 2020 07:36:45 +0000 (07:36 +0000)
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>

src/gallium/drivers/lima/ir/gp/disasm.c

index 87fdded3f2dd5536a7b49b653a449b0bbcc94f6e..bc0ce3bec4d703c53f7d8e1fe6cbfa1fd26bb15a 100644 (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;