https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115353
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Richard Ball <ricba...@gcc.gnu.org>: https://gcc.gnu.org/g:ca1924947b5bed8105ae020bef6950bddda448f3 commit r14-10289-gca1924947b5bed8105ae020bef6950bddda448f3 Author: Richard Ball <richard.b...@arm.com> Date: Thu Jun 6 16:10:14 2024 +0100 arm: Fix CASE_VECTOR_SHORTEN_MODE for thumb2. The CASE_VECTOR_SHORTEN_MODE query is missing some equals signs which causes suboptimal codegen due to missed optimisation opportunities. This patch also adds a test for thumb2 switch statements as none exist currently. gcc/ChangeLog: PR target/115353 * config/arm/arm.h (enum arm_auto_incmodes): Correct CASE_VECTOR_SHORTEN_MODE query. gcc/testsuite/ChangeLog: * gcc.target/arm/thumb2-switchstatement.c: New test. (cherry picked from commit 2963c76e8e24d4ebaf2b1b4ac4d7ca44eb0a9025)