aco: preserve kill flag on moved operands during RA
authorDaniel Schürmann <daniel@schuermann.dev>
Thu, 7 Nov 2019 15:22:55 +0000 (16:22 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Tue, 12 Nov 2019 15:59:48 +0000 (15:59 +0000)
Fixes: 93c8ebfa780ebd1495095e794731881aef29e7d3 aco: Initial commit of independent AMD compiler
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
src/amd/compiler/aco_register_allocation.cpp

index 3b4100cddd296b4181367fa6a6c804879831ac38..c90c91a0325c8cf37e75cbce2d5f624c1f4574cb 100644 (file)
@@ -1422,7 +1422,7 @@ void register_allocation(Program *program, std::vector<std::set<Temp>> live_out_
                      for (unsigned j = 0; j < i; j++) {
                         Operand& op = instr->operands[j];
                         if (op.isTemp() && op.tempId() == blocking_id) {
-                           op = Operand(pc_def.getTemp());
+                           op.setTemp(pc_def.getTemp());
                            op.setFixed(reg);
                         }
                      }