Mesa (master): aco/optimizer: Don't combine uniform bool s_and to s_andn2.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 5 23:15:25 UTC 2020
Module: Mesa
Branch: master
Commit: 4d34abd15c91ed67414e2e0dc1ae252f53574ef6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d34abd15c91ed67414e2e0dc1ae252f53574ef6
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Wed Feb 5 11:19:06 2020 +0100
aco/optimizer: Don't combine uniform bool s_and to s_andn2.
Fixes: 8a32f57fff56b3b94f1b5589feba38016f39427c
Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3714>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3714>
---
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 9ef94d4f697..0b9fccc379e 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -1844,6 +1844,9 @@ bool combine_salu_n2(opt_ctx& ctx, aco_ptr<Instruction>& instr)
if (instr->definitions[1].isTemp() && ctx.uses[instr->definitions[1].tempId()])
return false;
+ if (instr->definitions[0].isTemp() && ctx.info[instr->definitions[0].tempId()].is_uniform_bool())
+ return false;
+
for (unsigned i = 0; i < 2; i++) {
Instruction *op2_instr = follow_operand(ctx, instr->operands[i]);
if (!op2_instr || (op2_instr->opcode != aco_opcode::s_not_b32 && op2_instr->opcode != aco_opcode::s_not_b64))
More information about the mesa-commit
mailing list