aco/ra: allow v1b operands with 16-bit instructions

Instruction selection can create these.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: ec1bbfa608 ("aco/ra: refactor subdword operand stride")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12617>
This commit is contained in:
Rhys Perry 2021-08-30 13:58:52 +01:00 committed by Marge Bot
parent 2a7fa132be
commit 8037b21573

View file

@ -510,12 +510,12 @@ add_subdword_operand(ra_ctx& ctx, aco_ptr<Instruction>& instr, unsigned idx, uns
if (instr->isVALU()) {
/* check if we can use opsel */
if (instr->format == Format::VOP3) {
assert(rc == v2b && byte == 2);
assert(byte == 2);
instr->vop3().opsel |= 1 << idx;
return;
}
if (instr->isVOP3P()) {
assert(rc == v2b && byte == 2 && !(instr->vop3p().opsel_lo & (1 << idx)));
assert(byte == 2 && !(instr->vop3p().opsel_lo & (1 << idx)));
instr->vop3p().opsel_lo |= 1 << idx;
instr->vop3p().opsel_hi |= 1 << idx;
return;