aco: properly combine additions into ds_write2_b64/ds_read2_b64
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 14 Oct 2019 16:17:00 +0000 (17:17 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Tue, 22 Oct 2019 18:52:29 +0000 (18:52 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_optimizer.cpp

index 4a287336d0d5a8872d3cecc1c1e21fdc151ceff2..d9596ea8b5995e6d53522231b7f026123ae0f41c 100644 (file)
@@ -657,7 +657,8 @@ void label_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
          Temp base;
          uint32_t offset;
          if (i == 0 && parse_base_offset(ctx, instr.get(), i, &base, &offset) && base.regClass() == instr->operands[i].regClass()) {
-            if (instr->opcode == aco_opcode::ds_write2_b32 || instr->opcode == aco_opcode::ds_read2_b32) {
+            if (instr->opcode == aco_opcode::ds_write2_b32 || instr->opcode == aco_opcode::ds_read2_b32 ||
+                instr->opcode == aco_opcode::ds_write2_b64 || instr->opcode == aco_opcode::ds_read2_b64) {
                if (offset % 4 == 0 &&
                    ds->offset0 + (offset >> 2) <= 255 &&
                    ds->offset1 + (offset >> 2) <= 255) {