aco: fix copy statistic for 64-bit vgpr constant copy
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 9 Apr 2020 16:00:25 +0000 (17:00 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Apr 2020 13:25:17 +0000 (13:25 +0000)
The statistic is in units of instructions.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4469>

src/amd/compiler/aco_lower_to_hw_instr.cpp

index 63e13d96c883d9389bf200de47fce8a56276e094..4be1bef2a27da226f307b8c187caa165b46ce81e 100644 (file)
@@ -845,6 +845,7 @@ void handle_operands(std::map<PhysReg, copy_operation>& copy_map, lower_context*
             bld.vop1(aco_opcode::v_mov_b32, it->second.def, Operand((uint32_t)val));
             bld.vop1(aco_opcode::v_mov_b32, Definition(PhysReg{it->second.def.physReg() + 1}, v1),
                      Operand((uint32_t)(val >> 32)));
+            ctx->program->statistics[statistic_copies]++;
          } else {
             bld.copy(it->second.def, it->second.op);
          }