arm.c (arm_gen_constant): Set can_negate correctly when code is SET.
authorAndrew Stubbs <ams@codesourcery.com>
Tue, 30 Aug 2011 14:28:17 +0000 (14:28 +0000)
committerAndrew Stubbs <ams@gcc.gnu.org>
Tue, 30 Aug 2011 14:28:17 +0000 (14:28 +0000)
2011-08-30  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/arm/arm.c (arm_gen_constant): Set can_negate correctly
when code is SET.

From-SVN: r178319

gcc/ChangeLog
gcc/config/arm/arm.c

index 0313a8400cbe59f220dce4da9d0a767e0381449c..0fcf494990e742c4c02140a06c6300e4ef426235 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-30  Andrew Stubbs  <ams@codesourcery.com>
+
+       * config/arm/arm.c (arm_gen_constant): Set can_negate correctly
+       when code is SET.
+
 2011-08-30  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/48571
index 0490da23b5eeef59b8a060189fb0dd9e8aa23315..3a49f40906c5c0e7975d43a444132d014a7462b6 100644 (file)
@@ -3367,8 +3367,8 @@ arm_gen_constant (enum rtx_code code, enum machine_mode mode, rtx cond,
 
          if (code == SET)
            {
+             can_negate = can_invert;
              can_invert = 0;
-             can_negate = 1;
              code = PLUS;
            }
          else if (code == MINUS)