OSDN Git Service

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)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 13 Nov 2019 20:09:16 +0000 (12:09 -0800)
Fixes: 93c8ebfa780ebd1495095e794731881aef29e7d3 aco: Initial commit of independent AMD compiler

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit b6f5085dfee81d9c54fcda883d2b06742134084a)

src/amd/compiler/aco_register_allocation.cpp

index 3b4100c..c90c91a 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);
                         }
                      }