This patch removes some redundant code that caused me some confusion.
It's not possible to construct a constant from multiple ORN instructions, just as it's not possible to do it with multiple AND instructions.
OK? Andrew
2011-04-20 Andrew Stubbs <a...@codesourcery.com> gcc/ * config/arm/arm.c (arm_gen_constant): Remove redundant can_invert. --- src/gcc-mainline/gcc/config/arm/arm.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/src/gcc-mainline/gcc/config/arm/arm.c b/src/gcc-mainline/gcc/config/arm/arm.c index 533ad91..dee6f29 100644 --- a/src/gcc-mainline/gcc/config/arm/arm.c +++ b/src/gcc-mainline/gcc/config/arm/arm.c @@ -2745,9 +2745,6 @@ arm_gen_constant (enum rtx_code code, enum machine_mode mode, rtx cond, gen_rtx_SET (VOIDmode, target, source)); return 1; } - - if (TARGET_THUMB2) - can_invert = 1; break; case AND: @@ -3238,8 +3235,7 @@ arm_gen_constant (enum rtx_code code, enum machine_mode mode, rtx cond, if (remainder & (1 << i)) num_bits_set++; - if ((code == AND) - || (code != IOR && can_invert && num_bits_set > 16)) + if ((code == AND) || (can_invert && num_bits_set > 16)) remainder ^= 0xffffffff; else if (code == PLUS && num_bits_set > 16) remainder = (-remainder) & 0xffffffff;