https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114932
--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <tnfch...@gcc.gnu.org>: https://gcc.gnu.org/g:3c32575e5b6370270d38a80a7fa8eaa144e083d0 commit r15-6104-g3c32575e5b6370270d38a80a7fa8eaa144e083d0 Author: Tamar Christina <tamar.christ...@arm.com> Date: Wed Dec 11 11:45:36 2024 +0000 middle-end: refactor type to be explicit in operand_equal_p [PR114932] This is a refactoring with no expected behavioral change. The goal with this is to make the type of the expressions being used explicit. I did not change all the recursive calls to operand_equal_p () to recurse directly to the new function but instead this goes through the top level call which re-extracts the types. This was done because in most of the cases where we recurse type == arg. The second patch makes use of this new flexibility to implement an overload of operand_equal_p which checks for equality under two's complement. gcc/ChangeLog: PR tree-optimization/114932 * fold-const.cc (operand_compare::operand_equal_p): Split into one that takes explicit type parameters and use that in public one. * fold-const.h (class operand_compare): Add operand_equal_p private overload.