aco: fix p_extract with v1 dst and s1 operand

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: f14023666c ("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 4ea611bca0)
This commit is contained in:
Georg Lehmann 2023-09-26 17:13:12 +02:00 committed by Eric Engestrom
parent 02e77eeb2e
commit c7b62757aa
2 changed files with 2 additions and 2 deletions

View File

@ -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"
},

View File

@ -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) {