]> gcc.gnu.org Git - gcc.git/commit
ARM: Fix conditional execution [PR113915]
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Wed, 6 Mar 2024 17:35:16 +0000 (17:35 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Wed, 6 Mar 2024 17:35:55 +0000 (17:35 +0000)
commitb575f37a342cebb954aa85fa45df0604bfa1ada9
tree1920f658fbb7c3a7f9b737868fdbfcf16d80dbca
parent49c3f24552ee550f78416b6470b22af9be8bea72
ARM: Fix conditional execution [PR113915]

By default most patterns can be conditionalized on Arm targets.  However
Thumb-2 predication requires the "predicable" attribute be explicitly
set to "yes".  Most patterns are shared between Arm and Thumb(-2) and are
marked with "predicable".  Given this sharing, it does not make sense to
use a different default for Arm.  So only consider conditional execution
of instructions that have the predicable attribute set to yes.  This ensures
that patterns not explicitly marked as such are never conditionally executed.

gcc/ChangeLog:
PR target/113915
* config/arm/arm.md (NOCOND): Improve comment.
(arm_rev*) Add predicable.
* config/arm/arm.cc (arm_final_prescan_insn): Add check for
PREDICABLE_YES.

gcc/testsuite/ChangeLog:
PR target/113915
* gcc.target/arm/builtin-bswap-1.c: Fix test to allow conditional
execution both for Arm and Thumb-2.
gcc/config/arm/arm.cc
gcc/config/arm/arm.md
gcc/testsuite/gcc.target/arm/builtin-bswap-1.c
This page took 0.064468 seconds and 5 git commands to generate.