pan/bi: Don't attempt to fuse AND(ICMP, ICMP) if the AND is swizzled

There might be cases under which we can make this work but they're
tricky at best.  For now, don't even try.

Cc: mesa-stable
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit 918624174b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
This commit is contained in:
Faith Ekstrand 2026-02-05 21:52:09 -05:00 committed by Marge Bot
parent 4dd76ad0a1
commit e0682b4317
2 changed files with 3 additions and 1 deletions

View file

@ -924,7 +924,7 @@
"description": "pan/bi: Don't attempt to fuse AND(ICMP, ICMP) if the AND is swizzled",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -240,6 +240,8 @@ va_fuse_cmp(bi_context *ctx, bi_instr **lut, const BITSET_WORD *multiple,
/* Ensure we really have a LSHIFT that we can remap (so without shift) */
if (!va_remap_logical_to_logical_cmp(I->op, cmp_type) ||
I->src[0].swizzle != BI_SWIZZLE_H01 ||
I->src[1].swizzle != BI_SWIZZLE_H01 ||
!bi_is_zero(I->src[2]))
return false;