From 4ca4b064cf4bdbb4230b7dd3dae8d4eb11a013af Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 22 Jul 2024 16:41:52 -0700 Subject: [PATCH] intel/brw: Record g0 as live for sends with send_ex_desc_scratch set brw_send_indirect_split_message() implicitly reads g0 to construct the extended message descriptor for certain send messages when this is set. Record that liveness explicitly. Thanks to Francisco Jerez for reminding me about this use of g0. Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_fs_reg_allocate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp b/src/intel/compiler/brw_fs_reg_allocate.cpp index 585907dbcd7..b08820bedd9 100644 --- a/src/intel/compiler/brw_fs_reg_allocate.cpp +++ b/src/intel/compiler/brw_fs_reg_allocate.cpp @@ -220,6 +220,12 @@ void fs_visitor::calculate_payload_ranges(unsigned payload_node_count, } } + /* The generator implicitly uses g0 to construct extended message + * descriptors for scratch send messages when this bit is set. + */ + if (inst->send_ex_desc_scratch) + payload_last_use_ip[0] = use_ip; + if (inst->eot) { /* We could omit this for the !inst->header_present case, except * that the simulator apparently incorrectly reads from g0/g1