diff options
author | Samuel Pitoiset <[email protected]> | 2020-02-10 12:13:15 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-11 07:17:31 +0000 |
commit | ddd767387f336ed1578f171a2af4ca33c564d7f3 (patch) | |
tree | f9422cbdcb013df813f8231e395416943269f056 /src | |
parent | cd08d9abd76ce0002572639c26c79e051a2a0549 (diff) |
aco: fix creating v_madak if v_mad_f32 has two sgpr literals
Do not ignore that src1 can be a sgpr.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2435
Cc: <[email protected]>
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3759>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3759>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/compiler/aco_optimizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 0b9fccc379e..5f2e5637b71 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2604,7 +2604,7 @@ void select_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr) continue; /* if one of the operands is sgpr, we cannot add a literal somewhere else on pre-GFX10 or operands other than the 1st */ if (instr->operands[i].getTemp().type() == RegType::sgpr && (i > 0 || ctx.program->chip_class < GFX10)) { - if (ctx.info[instr->operands[i].tempId()].is_literal()) { + if (!sgpr_used && ctx.info[instr->operands[i].tempId()].is_literal()) { literal_uses = ctx.uses[instr->operands[i].tempId()]; literal_idx = i; } else { |