tree-ssa-phiopt.c (value_replacement): Properly verify we are the non-singleton PHI.
authorRichard Biener <rguenther@suse.de>
Tue, 21 Oct 2014 12:31:52 +0000 (12:31 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 21 Oct 2014 12:31:52 +0000 (12:31 +0000)
2014-10-21  Richard Biener  <rguenther@suse.de>

* tree-ssa-phiopt.c (value_replacement): Properly verify we
are the non-singleton PHI.

From-SVN: r216510

gcc/ChangeLog
gcc/tree-ssa-phiopt.c

index 98fc55232e7b0dcee5925ce1af392dd6f48fb6a0..978d7dc57c73a19fb3df99553795bef25381c890 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-21  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-phiopt.c (value_replacement): Properly verify we
+       are the non-singleton PHI.
+
 2014-10-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/63563
index f62010fd2d971e4b1e1a732a92f43fbecdd774c7..cac3fd600e47898ea0b66dc795f04ad5a0b25ba9 100644 (file)
@@ -814,7 +814,7 @@ value_replacement (basic_block cond_bb, basic_block middle_bb,
         for the edges e0 and e1 then we can remove the middle basic block. */
       if (emtpy_or_with_defined_p
          && single_non_singleton_phi_for_edges (phi_nodes (gimple_bb (phi)),
-                                                           e0, e1))
+                                                e0, e1) == phi)
        {
           replace_phi_edge_with_variable (cond_bb, e1, phi, arg);
          /* Note that we optimized this PHI.  */