From ea9782106cd2cfbb53237024dcc984a26acb7130 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Mon, 14 Oct 2019 12:25:00 +0000 Subject: [PATCH] [ARM] Enable arm_legitimize_address for Thumb-2 Currently arm_legitimize_address doesn't handle Thumb-2 at all, resulting in inefficient code. Since Thumb-2 supports similar address offsets use the Arm legitimization code for Thumb-2 to get significant codesize and performance gains. SPECINT2006 shows 0.4% gain on Cortex-A57, while SPECFP improves 0.2%. gcc/ * config/arm/arm.c (arm_legitimize_address): Remove Thumb-2 bailout. From-SVN: r276961 --- gcc/ChangeLog | 4 ++++ gcc/config/arm/arm.c | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f07a0e61e6b..176c0d21979 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-14 Wilco Dijkstra + + * config/arm/arm.c (arm_legitimize_address): Remove Thumb-2 bailout. + 2019-10-14 Wilco Dijkstra * config/arm/arm.c (arm_option_override): Don't override sched diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 394b1dd1902..ba330470141 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -8934,13 +8934,8 @@ arm_legitimize_address (rtx x, rtx orig_x, machine_mode mode) return x; } - if (!TARGET_ARM) - { - /* TODO: legitimize_address for Thumb2. */ - if (TARGET_THUMB2) - return x; - return thumb_legitimize_address (x, orig_x, mode); - } + if (TARGET_THUMB1) + return thumb_legitimize_address (x, orig_x, mode); if (GET_CODE (x) == PLUS) { -- 2.30.2