diff options
author | Rhys Perry <[email protected]> | 2019-11-22 14:17:27 +0000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-14 12:56:28 +0000 |
commit | 7da07ca3e43b92852715ab1c9b3848cb49bac567 (patch) | |
tree | 98ea22f1372fdc12b9335cf12befc1ea43b8082b /src/amd/compiler | |
parent | dc6c35e1c328f3f2db87d9ebd55f892527071683 (diff) |
aco: follow through temporary when merging tests into constant comparisons
This can happen with v_mov_b32(s_mov_b32(literal))
pipeline-db (Navi):
Totals from affected shaders:
SGPRS: 632 -> 632 (0.00 %)
VGPRS: 492 -> 492 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Code Size: 77488 -> 76928 (-0.72 %) bytes
Max Waves: 67 -> 67 (0.00 %)
Instructions: 14426 -> 14332 (-0.65 %)
pipeline-db (Vega):
Totals from affected shaders:
SGPRS: 632 -> 632 (0.00 %)
VGPRS: 492 -> 492 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Code Size: 77512 -> 76952 (-0.72 %) bytes
Max Waves: 67 -> 67 (0.00 %)
Instructions: 14432 -> 14338 (-0.65 %)
Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2883>
Diffstat (limited to 'src/amd/compiler')
-rw-r--r-- | src/amd/compiler/aco_optimizer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 61cb58df172..8406a9168e0 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -1394,7 +1394,8 @@ bool combine_constant_comparison_ordering(opt_ctx &ctx, aco_ptr<Instruction>& in if (cmp->operands[constant_operand].isConstant()) { constant = cmp->operands[constant_operand].constantValue(); } else if (cmp->operands[constant_operand].isTemp()) { - unsigned id = cmp->operands[constant_operand].tempId(); + Temp tmp = cmp->operands[constant_operand].getTemp(); + unsigned id = original_temp_id(ctx, tmp); if (!ctx.info[id].is_constant() && !ctx.info[id].is_literal()) return false; constant = ctx.info[id].val; |