tree-ssa-threadbackward.c (profitable_jump_thread_path): Treat same SSA names related.
authorRichard Biener <rguenther@suse.de>
Tue, 9 Aug 2016 08:09:21 +0000 (08:09 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 9 Aug 2016 08:09:21 +0000 (08:09 +0000)
2016-08-09  Richard Biener  <rguenther@suse.de>

* tree-ssa-threadbackward.c (profitable_jump_thread_path):
        Treat same SSA names related.

From-SVN: r239276

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

index e71b548253ef25002454e547f87459aaccb05958..9cb04ca01b49e164c4d8f80b4eb97f198eabe228 100644 (file)
@@ -1,3 +1,8 @@
+2016-08-09  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-threadbackward.c (profitable_jump_thread_path):
+       Treat same SSA names related.
+
 2016-08-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/72824
index 234ce50d10ca175e760c57bf8dcadeb1b2b53893..e05669f81472e17ad3334adb28bad2a395412679 100644 (file)
@@ -207,8 +207,9 @@ profitable_jump_thread_path (vec<basic_block, va_gc> *&path,
                  /* Note that if both NAME and DST are anonymous
                     SSA_NAMEs, then we do not have enough information
                     to consider them associated.  */
-                 if ((SSA_NAME_VAR (dst) != SSA_NAME_VAR (name)
-                      || !SSA_NAME_VAR (dst))
+                 if (dst != name
+                     && (SSA_NAME_VAR (dst) != SSA_NAME_VAR (name)
+                         || !SSA_NAME_VAR (dst))
                      && !virtual_operand_p (dst))
                    ++n_insns;
                }