From 55a37838b9cc130a28e17d6460cc15f19c06f33f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 28 Oct 2025 11:02:16 -0700 Subject: [PATCH] elk: Apply vgrf127 workaround in more cases No shader-db changes on Broadwell. Older platforms were not tested. Fixes: e7b7d572b3b ("intel/fs/ra: Re-arrange interference setup") Acked-by: Caio Oliveira (cherry picked from commit 2e8b89ec60f700c04347ab850d25aa6d85e2083b) Part-of: --- .pick_status.json | 2 +- src/intel/compiler/elk/elk_fs_reg_allocate.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1898a3677b9..f89916dd0e1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -684,7 +684,7 @@ "description": "elk: Apply vgrf127 workaround in more cases", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e7b7d572b3bf801fa2a1a8cdff181fdf75780a96", "notes": null diff --git a/src/intel/compiler/elk/elk_fs_reg_allocate.cpp b/src/intel/compiler/elk/elk_fs_reg_allocate.cpp index 04f15050841..f2beac2195e 100644 --- a/src/intel/compiler/elk/elk_fs_reg_allocate.cpp +++ b/src/intel/compiler/elk/elk_fs_reg_allocate.cpp @@ -576,10 +576,13 @@ elk_fs_reg_alloc::setup_inst_interference(const elk_fs_inst *inst) * This node has a fixed assignment to grf127. * * We don't apply it to SIMD16 instructions because previous code avoids - * any register overlap between sources and destination. + * any register overlap between sources and destination. Some care is + * taken to detect when interference may not have been added between + * source and destination. This can occur in SIMD16 with UW + * destination. See also gitlab issue #14171. */ - if (inst->exec_size < 16 && inst->is_send_from_grf() && - inst->dst.file == VGRF) + if (inst->is_send_from_grf() && inst->dst.file == VGRF && + (inst->exec_size < 16 || type_sz(inst->dst.type) < 4)) ra_add_node_interference(g, first_vgrf_node + inst->dst.nr, grf127_send_hack_node);