diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index bacd9e14242..b375d924099 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -2318,9 +2318,16 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) case nir_op_vec16: unreachable("should've been lowered"); - case nir_op_unpack_32_2x16: - bi_mov_i32_to(b, dst, bi_src_index(&instr->src[0].src)); - break; + case nir_op_unpack_32_2x16: { + /* Should have been scalarized */ + assert(comps == 2 && sz == 16); + + bi_index vec = bi_src_index(&instr->src[0].src); + unsigned chan = instr->src[0].swizzle[0]; + + bi_mov_i32_to(b, dst, bi_extract(b, vec, chan)); + return; + } case nir_op_unpack_64_2x32_split_x: bi_mov_i32_to(b, dst, bi_extract(b, bi_src_index(&instr->src[0].src), 0));