Module: Mesa
Branch: main
Commit: 1d167d187efe88fb84d60972f2e053c75379344b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d167d187efe88fb84d60972f2e053c75379344b

Author: Georg Lehmann <dadschoo...@gmail.com>
Date:   Sun Nov 12 19:51:53 2023 +0100

aco/gfx10+: don't use v_cmpx with VCC def

Reviewed-by: Rhys Perry <pendingchao...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26163>

---

 src/amd/compiler/aco_lower_to_hw_instr.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp 
b/src/amd/compiler/aco_lower_to_hw_instr.cpp
index a6d7e98a6e1..dedb84e568c 100644
--- a/src/amd/compiler/aco_lower_to_hw_instr.cpp
+++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp
@@ -1100,8 +1100,11 @@ emit_bpermute_readlane(Program* program, 
aco_ptr<Instruction>& instr, Builder& b
     */
    for (unsigned n = 0; n < program->wave_size; ++n) {
       /* Activate the lane which has N for its source index */
-      bld.vopc(aco_opcode::v_cmpx_eq_u32, Definition(exec, bld.lm), 
clobber_vcc, Operand::c32(n),
-               index);
+      if (program->gfx_level >= GFX10)
+         bld.vopc(aco_opcode::v_cmpx_eq_u32, Definition(exec, bld.lm), 
Operand::c32(n), index);
+      else
+         bld.vopc(aco_opcode::v_cmpx_eq_u32, clobber_vcc, Definition(exec, 
bld.lm), Operand::c32(n),
+                  index);
       /* Read the data from lane N */
       bld.readlane(Definition(vcc, s1), input, Operand::c32(n));
       /* On the active lane, move the data we read from lane N to the 
destination VGPR */

Reply via email to