diff options
author | Rhys Perry <[email protected]> | 2020-01-24 17:37:11 +0000 |
---|---|---|
committer | Rhys Perry <[email protected]> | 2020-01-27 14:50:37 +0000 |
commit | 2dc63d39d31d56ce44154372c1d1771c73d22a68 (patch) | |
tree | 4f1014311a94b649b6164dfdefd5fb62284c93c8 /src/amd | |
parent | 827681f9213189374a75b3838a03296bdd7e9716 (diff) |
aco: fix literal application with v_cndmask_b32/v_addc_co_u32/etc
No pipeline-db changes
Signed-off-by: Rhys Perry <[email protected]>
Fixes: 0be74090696 ('aco: rewrite literal combining')
Reviewed-by: Daniel Schürmann <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3541>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3541>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/compiler/aco_optimizer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index fbeb76df990..93d934c69ed 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2674,6 +2674,9 @@ void select_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr) unsigned num_operands = 1; if (instr->isSALU() || (ctx.program->chip_class >= GFX10 && can_use_VOP3(ctx, instr))) num_operands = instr->operands.size(); + /* catch VOP2 with a 3rd SGPR operand (e.g. v_cndmask_b32, v_addc_co_u32) */ + else if (instr->isVALU() && instr->operands.size() >= 3) + return; unsigned sgpr_ids[2] = {0, 0}; bool is_literal_sgpr = false; |