Module: Mesa
Branch: staging/23.1
Commit: c7b62757aa0946e2df0dbe6ce89c352683ff7380
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7b62757aa0946e2df0dbe6ce89c352683ff7380

Author: Georg Lehmann <[email protected]>
Date:   Tue Sep 26 17:13:12 2023 +0200

aco: fix p_extract with v1 dst and s1 operand

Reviewed-by: Rhys Perry <[email protected]>
Fixes: f14023666ca ("aco: Allow p_extract to have different definition and 
operand sizes.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25403>
(cherry picked from commit 4ea611bca02c4e5ff783e73476d7b8f63766696e)

---

 .pick_status.json                          | 2 +-
 src/amd/compiler/aco_lower_to_hw_instr.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index b13ae0ac22c..8b0afa330af 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1093,7 +1093,7 @@
         "description": "aco: fix p_extract with v1 dst and s1 operand",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "f14023666ca9f6387af668e403627ea2bf85c66a"
     },
diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp 
b/src/amd/compiler/aco_lower_to_hw_instr.cpp
index 22583fb3e2c..c1a5d1050e6 100644
--- a/src/amd/compiler/aco_lower_to_hw_instr.cpp
+++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp
@@ -2385,7 +2385,7 @@ lower_to_hw_instr(Program* program)
                      bld.sop2(signext ? aco_opcode::s_bfe_i32 : 
aco_opcode::s_bfe_u32, dst,
                               bld.def(s1, scc), op, Operand::c32((bits << 16) 
| offset));
                   }
-               } else if ((dst.regClass() == v1 && op.regClass() == v1) ||
+               } else if ((dst.regClass() == v1 && op.physReg().byte() == 0) ||
                           ctx.program->gfx_level <= GFX7) {
                   assert(op.physReg().byte() == 0 && dst.physReg().byte() == 
0);
                   if (offset == (32 - bits) && op.regClass() != s1) {

Reply via email to