Module: Mesa
Branch: staging/20.0
Commit: 06a9d51f2707abba02975dc2e8ef72a3f9d1dfe0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=06a9d51f2707abba02975dc2e8ef72a3f9d1dfe0

Author: Timur Kristóf <[email protected]>
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 <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Tested-by: Marge Bot 
<https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3714>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3714>
(cherry picked from commit 4d34abd15c91ed67414e2e0dc1ae252f53574ef6)

---

 .pick_status.json                  | 2 +-
 src/amd/compiler/aco_optimizer.cpp | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index b037ab870b5..cdb37d8ab0c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -364,7 +364,7 @@
         "description": "aco/optimizer: Don't combine uniform bool s_and to 
s_andn2.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "8a32f57fff56b3b94f1b5589feba38016f39427c"
     },
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))

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to