https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97497
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>: https://gcc.gnu.org/g:4a56ba8c8ec281ef794a598f64a5707204ca9088 commit r16-3266-g4a56ba8c8ec281ef794a598f64a5707204ca9088 Author: Richard Sandiford <richard.sandif...@arm.com> Date: Mon Aug 18 11:12:57 2025 +0100 gcse: Fix handling of partial clobbers [PR97497] This patch fixes an internal disagreement in gcse about how to handle partial clobbers. Like many passes, gcse doesn't track the modes of live values, so if a call clobbers only part of a register, the pass has to make conservative assumptions. As the comment in the patch says, this means: (1) ignoring partial clobbers when computing liveness and reaching definitions (2) treating partial clobbers as full clobbers when computing availability DF is mostly concerned with (1), so ignores partial clobbers. compute_hash_table_work did (2) when calculating kill sets, but compute_transp didn't do (2) when computing transparency. This led to a nonsensical situation of a register being in both the transparency and kill sets. gcc/ PR rtl-optimization/97497 * function-abi.h (predefined_function_abi::only_partial_reg_clobbers) (function_abi::only_partial_reg_clobbers): New member functions. * gcse-common.cc: Include regs.h and function-abi.h. (compute_transp): Check for partially call-clobbered registers and treat them as not being transparent in blocks with calls.