From b4c2954503e28e180c311998d1e8c7a286d1bc3b Mon Sep 17 00:00:00 2001 From: Romaric Jodin Date: Fri, 14 Nov 2025 15:16:50 +0100 Subject: [PATCH] pan/bi: do not vectorize nir_op_f2{i,u}8 Vectorizing nir_op_f2i8 and nir_op_f2u8 can lead other passes to generate large vector (32x2) that are not supported: ---------------------------------- 16x2 %23 = fmul! %22, %21 8x2 %24 = f2i8! %23 ---- TRANSFORM TO ---------------- 16x2 %30 = fmul! %29, %28 32x2 %31 = f2f32! %30 16x2 %32 = f2i16! %31 8x2 %33 = i2i8! %32 ---------------------------------- examples: - dEQP-VK.spirv_assembly.type.vec2.i8#mod_frag - dEQP-VK.spirv_assembly.type.vec2.i8#rem_frag - dEQP-VK.spirv_assembly.instruction.compute.convertftou#float16_to_uint8_max Reviewed-by: Christoph Pillmayer Part-of: --- src/panfrost/compiler/bifrost_compile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index 258e24d5b36..bcf39fc5952 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -5510,6 +5510,8 @@ bi_vectorize_filter(const nir_instr *instr, const void *data) case nir_op_b2f16: case nir_op_f2i16: case nir_op_f2u16: + case nir_op_f2i8: + case nir_op_f2u8: case nir_op_extract_u8: case nir_op_extract_i8: case nir_op_extract_u16: