From 60df6998b481481ea062db094307ce861fc80951 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Tue, 24 Mar 2026 18:09:35 -0400 Subject: [PATCH] pan/bi: v2x16 conversions don't replicate They swizzle just like anything else. Technically, we could maybe do a little better than the generic case for these since they only read 8 bits per 16 bits in the destination but the generic case is correct, even if it isn't optimal. Fixes: f7d44a46cd42 ("pan/bi: Optimize replication") Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Christoph Pillmayer Reviewed-by: Lorenzo Rossi (cherry picked from commit 8dc458225b976833270d0f90752d6afffa385360) Part-of: --- .pick_status.json | 2 +- src/panfrost/compiler/bifrost/bi_lower_swizzle.c | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7c9d3b340fa..f28ebe5b462 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2074,7 +2074,7 @@ "description": "pan/bi: v2x16 conversions don't replicate", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f7d44a46cd424e797a38ef732360e546f093f0ae", "notes": null diff --git a/src/panfrost/compiler/bifrost/bi_lower_swizzle.c b/src/panfrost/compiler/bifrost/bi_lower_swizzle.c index eaf3eb36b4b..40b39e69e85 100644 --- a/src/panfrost/compiler/bifrost/bi_lower_swizzle.c +++ b/src/panfrost/compiler/bifrost/bi_lower_swizzle.c @@ -167,16 +167,6 @@ bi_instr_replicates(bi_instr *I, BITSET_WORD *replicates_16) case BI_OPCODE_V2F32_TO_V2F16: return bi_is_value_equiv(I->src[0], I->src[1]); - case BI_OPCODE_V2F16_TO_V2S16: - case BI_OPCODE_V2F16_TO_V2U16: - case BI_OPCODE_V2S16_TO_V2F16: - case BI_OPCODE_V2S8_TO_V2F16: - case BI_OPCODE_V2S8_TO_V2S16: - case BI_OPCODE_V2U16_TO_V2F16: - case BI_OPCODE_V2U8_TO_V2F16: - case BI_OPCODE_V2U8_TO_V2U16: - return true; - /* 16-bit transcendentals are defined to output zero in their * upper half, so they do not replicate */