aco: improve check for moving temporaries out of fixed definitions
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 11 Jun 2020 13:22:13 +0000 (14:22 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 15 Jun 2020 18:24:22 +0000 (18:24 +0000)
No fossil-db changes.

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/5245>

src/amd/compiler/aco_register_allocation.cpp

index 4841b5eb6f0075736e8cf3fc4d8a833ec168e60e..985aae4cafdaf91e8e2e9e679692ff79906584d7 100644 (file)
@@ -2085,7 +2085,7 @@ void register_allocation(Program *program, std::vector<TempSet>& live_out_per_bl
 
             adjust_max_used_regs(ctx, definition.regClass(), definition.physReg());
             /* check if the target register is blocked */
-            if (register_file[definition.physReg().reg()] != 0) {
+            if (register_file.test(definition.physReg(), definition.bytes())) {
                /* create parallelcopy pair to move blocking vars */
                std::set<std::pair<unsigned, unsigned>> vars = collect_vars(ctx, register_file, definition.physReg(), definition.size());