From f1812437e877e0ec2ede01694344c171a00e3bc7 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 28 Sep 2022 16:26:02 -0700 Subject: [PATCH] intel/eu/xehp+: Don't initialize mlen and rlen descriptor fields from lsc_msg_desc*(). These fields are overlapping with the ones set by brw_message_desc(), so the latter should be used instead. This fixes corruption of the LSC message descriptors when inconsistent values are specified through both helpers, which can happen if the 'inst->mlen' field is modified during optimization (e.g. by opt_split_sends()). Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_eu.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index 1a03f8067b4..8ceaa9ac9bc 100644 --- a/src/intel/compiler/brw_eu.h +++ b/src/intel/compiler/brw_eu.h @@ -1156,15 +1156,6 @@ lsc_msg_desc_wcmask(UNUSED const struct intel_device_info *devinfo, bool transpose, unsigned cache_ctrl, bool has_dest, unsigned cmask) { assert(devinfo->has_lsc); - - unsigned dest_length = !has_dest ? 0 : - DIV_ROUND_UP(lsc_data_size_bytes(data_sz) * num_channels * simd_size, - reg_unit(devinfo) * REG_SIZE); - - unsigned src0_length = - DIV_ROUND_UP(lsc_addr_size_bytes(addr_sz) * num_coordinates * simd_size, - reg_unit(devinfo) * REG_SIZE); - assert(!transpose || lsc_opcode_has_transpose(opcode)); unsigned msg_desc = @@ -1174,8 +1165,6 @@ lsc_msg_desc_wcmask(UNUSED const struct intel_device_info *devinfo, SET_BITS(transpose, 15, 15) | (devinfo->ver >= 20 ? SET_BITS(cache_ctrl, 19, 16) : SET_BITS(cache_ctrl, 19, 17)) | - SET_BITS(dest_length, 24, 20) | - SET_BITS(src0_length, 28, 25) | SET_BITS(addr_type, 30, 29); if (lsc_opcode_has_cmask(opcode))