]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-ssa-dse.c
Correct a function pre/postcondition [PR102403].
[thirdparty/gcc.git] / gcc / tree-ssa-dse.c
index c3939a6417f4480c36335113fb516bdd0ee612e4..98daa8ab24c966d107c09f436fb474eb805069da 100644 (file)
@@ -813,15 +813,11 @@ dse_classify_store (ao_ref *ref, gimple *stmt,
              break;
            }
 
-         /* We have visited ourselves already so ignore STMT for the
-            purpose of chaining.  */
-         if (use_stmt == stmt)
-           ;
          /* In simple cases we can look through PHI nodes, but we
             have to be careful with loops and with memory references
             containing operands that are also operands of PHI nodes.
             See gcc.c-torture/execute/20051110-*.c.  */
-         else if (gimple_code (use_stmt) == GIMPLE_PHI)
+         if (gimple_code (use_stmt) == GIMPLE_PHI)
            {
              /* If we already visited this PHI ignore it for further
                 processing.  */
@@ -861,6 +857,10 @@ dse_classify_store (ao_ref *ref, gimple *stmt,
              fail = true;
              break;
            }
+         /* We have visited ourselves already so ignore STMT for the
+            purpose of chaining.  */
+         else if (use_stmt == stmt)
+           ;
          /* If this is a store, remember it as we possibly need to walk the
             defs uses.  */
          else if (gimple_vdef (use_stmt))