From 80f01c03ba64ef1347156c7e6ffc0b5443b9a26f Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Mon, 28 Jul 2025 22:15:24 -0700 Subject: [PATCH] brw: remove unnecessary casts to unsigned after calling LSC_CACHE() The macro already casts the values to unsigned. Reviewed-by: Caio Oliveira Signed-off-by: Paulo Zanoni Part-of: --- src/intel/compiler/brw_lower_logical_sends.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/intel/compiler/brw_lower_logical_sends.cpp b/src/intel/compiler/brw_lower_logical_sends.cpp index a13ae0a5d90..1d85fbf433f 100644 --- a/src/intel/compiler/brw_lower_logical_sends.cpp +++ b/src/intel/compiler/brw_lower_logical_sends.cpp @@ -1587,13 +1587,13 @@ lower_lsc_memory_logical_send(const brw_builder &bld, brw_inst *inst) * these operations uncached. */ unsigned cache_mode = - lsc_opcode_is_atomic(op) ? (unsigned) LSC_CACHE(devinfo, STORE, L1UC_L3WB) : + lsc_opcode_is_atomic(op) ? LSC_CACHE(devinfo, STORE, L1UC_L3WB) : volatile_access ? (lsc_opcode_is_store(op) ? - (unsigned) LSC_CACHE(devinfo, STORE, L1UC_L3UC) : - (unsigned) LSC_CACHE(devinfo, LOAD, L1UC_L3UC)) : - lsc_opcode_is_store(op) ? (unsigned) LSC_CACHE(devinfo, STORE, L1STATE_L3MOCS) : - (unsigned) LSC_CACHE(devinfo, LOAD, L1STATE_L3MOCS); + LSC_CACHE(devinfo, STORE, L1UC_L3UC) : + LSC_CACHE(devinfo, LOAD, L1UC_L3UC)) : + lsc_opcode_is_store(op) ? LSC_CACHE(devinfo, STORE, L1STATE_L3MOCS) : + LSC_CACHE(devinfo, LOAD, L1STATE_L3MOCS); /* If we're a fragment shader, we have to predicate with the sample mask to * avoid helper invocations in instructions with side effects, unless they