Mesa (master): aco: use v_xor3_b32
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 8 13:32:40 UTC 2020
Module: Mesa
Branch: master
Commit: 43e69475ad8bb0edb9a454af690c3c8ac69af866
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=43e69475ad8bb0edb9a454af690c3c8ac69af866
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Thu Jun 4 14:36:00 2020 +0100
aco: use v_xor3_b32
fossil-db (Navi):
Totals from 334 (0.26% of 128321) affected shaders:
CodeSize: 3345532 -> 3345484 (-0.00%); split: -0.00%, +0.00%
Instrs: 624662 -> 622778 (-0.30%); split: -0.30%, +0.00%
Mostly affects some parallel-rdp shaders
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5357>
---
src/amd/compiler/aco_optimizer.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index f16f165c21b..2c0bd59d290 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -2542,6 +2542,9 @@ void combine_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr
else if (combine_three_valu_op(ctx, instr, aco_opcode::v_and_b32, aco_opcode::v_and_or_b32, "120", 1 | 2)) ;
else if (combine_three_valu_op(ctx, instr, aco_opcode::s_lshl_b32, aco_opcode::v_lshl_or_b32, "120", 1 | 2)) ;
else combine_three_valu_op(ctx, instr, aco_opcode::v_lshlrev_b32, aco_opcode::v_lshl_or_b32, "210", 1 | 2);
+ } else if (instr->opcode == aco_opcode::v_xor_b32 && ctx.program->chip_class >= GFX10) {
+ if (combine_three_valu_op(ctx, instr, aco_opcode::v_xor_b32, aco_opcode::v_xor3_b32, "012", 1 | 2)) ;
+ else combine_three_valu_op(ctx, instr, aco_opcode::s_xor_b32, aco_opcode::v_xor3_b32, "012", 1 | 2);
} else if (instr->opcode == aco_opcode::v_add_u32) {
if (combine_add_sub_b2i(ctx, instr, aco_opcode::v_addc_co_u32, 1 | 2)) ;
else if (ctx.program->chip_class >= GFX9) {
More information about the mesa-commit
mailing list