ir3: Fix shared IMAD24 lowering.

Caught by
dEQP-VK.spirv_assembly.instruction.compute.opsdotkhr.all_us_v2i16_out32
and friends in !41178

Fixes: b4874aa5cf ("ir3: Use scalar ALU instructions when possible")
(cherry picked from commit d8b525466c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41402>
This commit is contained in:
Emma Anholt 2026-04-29 16:58:23 -07:00 committed by Eric Engestrom
parent 3aba64c168
commit 0db5577ee2
2 changed files with 2 additions and 2 deletions

View file

@ -2234,7 +2234,7 @@
"description": "ir3: Fix shared IMAD24 lowering.",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "b4874aa5cf56a7041eb609b6d9829719f8a49bcb",
"notes": null

View file

@ -870,7 +870,7 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu)
case nir_op_imad24_ir3:
if (use_shared) {
dst = ir3_ADD_U_rpt(b, dst_sz,
ir3_MUL_U24_rpt(b, dst_sz, src[0], 0, src[1], 0),
ir3_MUL_S24_rpt(b, dst_sz, src[0], 0, src[1], 0),
0, src[2], 0);
} else {
dst = ir3_MAD_S24_rpt(b, dst_sz, src[0], 0, src[1], 0, src[2], 0);