2015-02-10 Michael Collison <michael.collison@linaro.org>
authorcollison <collison@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Feb 2015 08:05:35 +0000 (08:05 +0000)
committercollison <collison@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Feb 2015 08:05:35 +0000 (08:05 +0000)
Backport from trunk r217215.
2014-11-07  Jiong Wang  <jiong.wang@arm.com>
2014-11-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/63676
* gimple-fold.c (fold_gimple_assign): Do not fold node when
TREE_CLOBBER_P be true.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@220572 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.linaro
gcc/gimple-fold.c

index eba29e9..55a3182 100644 (file)
@@ -1,5 +1,15 @@
 2015-02-10  Michael Collison  <michael.collison@linaro.org>
 
+       Backport from trunk r217215.
+       2014-11-07  Jiong Wang  <jiong.wang@arm.com>
+       2014-11-07  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/63676
+       * gimple-fold.c (fold_gimple_assign): Do not fold node when
+       TREE_CLOBBER_P be true.
+
+2015-02-10  Michael Collison  <michael.collison@linaro.org>
+
        Backport from trunk r219583.
        2015-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
index 2527d29..1bc41f0 100644 (file)
@@ -374,6 +374,9 @@ fold_gimple_assign (gimple_stmt_iterator *si)
       {
         tree rhs = gimple_assign_rhs1 (stmt);
 
+       if (TREE_CLOBBER_P (rhs))
+         return NULL_TREE;
+
        if (REFERENCE_CLASS_P (rhs))
          return maybe_fold_reference (rhs, false);