Mesa (main): aco: don't combine add/mul of different bit-size
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 3 16:21:09 UTC 2022
Module: Mesa
Branch: main
Commit: 13bbc7c882cd06435cee0a72352f409911a01ded
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=13bbc7c882cd06435cee0a72352f409911a01ded
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Mon Jan 31 18:22:58 2022 +0000
aco: don't combine add/mul of different bit-size
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/14810>
---
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 1a363941b13..7dfdb05e3ff 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -3571,6 +3571,9 @@ combine_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
if (info.instr->isVOP3() && (info.instr->vop3().clamp || info.instr->vop3().omod))
continue;
+ if (get_operand_size(instr, i) != info.instr->definitions[0].bytes() * 8)
+ continue;
+
bool legacy = info.instr->opcode == aco_opcode::v_mul_legacy_f32;
if (legacy && need_fma && ctx.program->chip_class < GFX10_3)
continue;
More information about the mesa-commit
mailing list