https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114932
--- Comment #16 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:25127123100f04c2d5d70c6933a5f5aedcd69c40 commit r15-1808-g25127123100f04c2d5d70c6933a5f5aedcd69c40 Author: Tamar Christina <tamar.christ...@arm.com> Date: Wed Jul 3 09:30:28 2024 +0100 ivopts: fix wide_int_constant_multiple_p when VAL and DIV are 0. [PR114932] wide_int_constant_multiple_p tries to check if for two tree expressions a and b that there is a multiplier which makes a == b * c. This code however seems to think that there's no c where a=0 and b=0 are equal which is of course wrong. This fixes it and also fixes the comment. gcc/ChangeLog: PR tree-optimization/114932 * tree-affine.cc (wide_int_constant_multiple_p): Support 0 and 0 being multiples.