diff options
author | Rhys Perry <[email protected]> | 2020-01-23 20:03:40 +0000 |
---|---|---|
committer | Rhys Perry <[email protected]> | 2020-01-27 14:50:37 +0000 |
commit | 827681f9213189374a75b3838a03296bdd7e9716 (patch) | |
tree | 6759b0941ad2961804b8b4490a1e57de51e67e8b /src | |
parent | 92970adb4ba4e64422f46893642f8b85f4e130f5 (diff) |
aco: always add sgprs to sgpr_ids when choosing literals
Even if it's a literal, we should add this to sgpr_ids.
No pipeline-db changes.
Signed-off-by: Rhys Perry <[email protected]>
Fixes: 0be74090696 ('aco: rewrite literal combining')
Reviewed-by: Daniel Schürmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3541>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/compiler/aco_optimizer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 73b9c653a64..fbeb76df990 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2682,13 +2682,15 @@ void select_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr) /* choose a literal to apply */ for (unsigned i = 0; i < num_operands; i++) { Operand op = instr->operands[i]; + + if (instr->isVALU() && op.isTemp() && op.getTemp().type() == RegType::sgpr && + op.tempId() != sgpr_ids[0]) + sgpr_ids[!!sgpr_ids[0]] = op.tempId(); + if (op.isLiteral()) { current_literal = op; continue; } else if (!op.isTemp() || !ctx.info[op.tempId()].is_literal()) { - if (instr->isVALU() && op.isTemp() && op.getTemp().type() == RegType::sgpr && - op.tempId() != sgpr_ids[0]) - sgpr_ids[!!sgpr_ids[0]] = op.tempId(); continue; } |