tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for propagating all kinds of constants.
authorRichard Guenther <rguenther@suse.de>
Wed, 14 Dec 2011 15:34:35 +0000 (15:34 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 14 Dec 2011 15:34:35 +0000 (15:34 +0000)
2011-12-14  Richard Guenther  <rguenther@suse.de>

* tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for
propagating all kinds of constants.

From-SVN: r182337

gcc/ChangeLog
gcc/tree-cfg.c

index 0aee51fbc75dad5086d0b96a95252f3f307ad7d9..a297cce69e68b89a043fbd24ddd26886f4b6923c 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-14  Richard Guenther  <rguenther@suse.de>
+
+       * tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for
+       propagating all kinds of constants.
+
 2011-12-14  Richard Guenther  <rguenther@suse.de>
 
        PR lto/51497
index 3d1b775c72e4c764f0ef457bbc0d5e6ee01a2d73..4c5982dcd8dd4271a362dbb8033bd34fdbbbb9f4 100644 (file)
@@ -1612,8 +1612,8 @@ replace_uses_by (tree name, tree val)
          /* FIXME.  It shouldn't be required to keep TREE_CONSTANT
             on ADDR_EXPRs up-to-date on GIMPLE.  Propagation will
             only change sth from non-invariant to invariant, and only
-            when propagating integer constants.  */
-         if (TREE_CODE (val) == INTEGER_CST)
+            when propagating constants.  */
+         if (is_gimple_min_invariant (val))
            for (i = 0; i < gimple_num_ops (stmt); i++)
              {
                tree op = gimple_op (stmt, i);