https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123102
--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Richard Earnshaw <[email protected]>: https://gcc.gnu.org/g:4d49f7b1810f6749d75ba440cdad08bf19997833 commit r13-10286-g4d49f7b1810f6749d75ba440cdad08bf19997833 Author: Richard Earnshaw <[email protected]> Date: Tue Apr 14 14:45:38 2026 +0100 arm: apply stronger checks on conditional-compare patterns [PR123102] If a conditional compare operation is generated during expand, then combine may try to substitute into it in order to generate better code; but if it does so, we need to validate that the optimized sequence is still a valid conditional compare. We were skipping those checks and that can lead to wrong code being generated. gcc/ChangeLog: PR target/123102 * config/arm/arm.md (*cmp_ite0): Apply stricter checks on the comparison mode. (*cmp_ite1, *cmp_and, *cmp_ior): Likewise. (cherry picked from commit 861a3dac61bb55f8f3fc10a6bea7b814262b9bf5)
