]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: Fix CASE_VECTOR_SHORTEN_MODE for thumb2.
authorRichard Ball <richard.ball@arm.com>
Thu, 6 Jun 2024 15:10:14 +0000 (16:10 +0100)
committerRichard Ball <richard.ball@arm.com>
Thu, 6 Jun 2024 15:10:14 +0000 (16:10 +0100)
commit2963c76e8e24d4ebaf2b1b4ac4d7ca44eb0a9025
tree33236ffed884e3fc396894c503e75acfb2a77aaf
parentc559353af49fe5743d226ac3112a285b27a50f6a
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.
gcc/config/arm/arm.h
gcc/testsuite/gcc.target/arm/thumb2-switchstatement.c [new file with mode: 0644]