From 567bc7a8df5c2ab5a4a87e3b6334491cc2a801d5 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Thu, 2 Apr 2026 02:22:21 -0400 Subject: [PATCH] pan/bi: Simplify extract_i8 handling Now that bi_byte() does the right thing, we can just use it and not worry about the rest. Reviewed-by: Christoph Pillmayer Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Lorenzo Rossi Part-of: --- src/panfrost/compiler/bifrost/bifrost_compile.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index d3bef10dbf3..b9437c742df 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -3040,17 +3040,6 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) assert((src_sz == 16 || src_sz == 32) && "should be lowered"); unsigned byte = nir_alu_src_as_uint(instr->src[1]); - if (s0.swizzle == BI_SWIZZLE_H11) { - assert(byte < 2); - byte += 2; - } else if (s0.swizzle != BI_SWIZZLE_H01) { - assert(s0.swizzle == BI_SWIZZLE_H00); - } - - assert(byte < 4); - - s0.swizzle = BI_SWIZZLE_H01; - if (instr->op == nir_op_extract_i8) bi_s8_to_s32_to(b, dst, bi_byte(s0, byte)); else