diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 15e1b86f40a..3676c54ae30 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-04-05 Tom de Vries + + PR target/43920 + * config/arm/arm.h (BRANCH_COST): Set to 1 for Thumb-2 when optimizing + for size. + 2011-04-05 Tom de Vries PR target/43920 diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 5c3f2f81fce..f302de2158f 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2019,7 +2019,8 @@ typedef struct /* Try to generate sequences that don't involve branches, we can then use conditional instructions */ #define BRANCH_COST(speed_p, predictable_p) \ - (TARGET_32BIT ? 4 : (optimize > 0 ? 2 : 0)) + (TARGET_32BIT ? (TARGET_THUMB2 && !speed_p ? 1 : 4) \ + : (optimize > 0 ? 2 : 0)) /* Position Independent Code. */ /* We decide which register to use based on the compilation options and