(cse_insn): After inserting src_eqv...
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 10 Aug 1993 19:11:27 +0000 (12:11 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 10 Aug 1993 19:11:27 +0000 (12:11 -0700)
(cse_insn): After inserting src_eqv, check to see if it is
identical to any uninserted SET_SRCs, and if so, set their src_elt
to src_eqv_elt.

From-SVN: r5129

gcc/cse.c

index 81a144a6eab35663d86fe46182ade2c3f52727ff..540c777407a1af79552e55cd8d7643566154a4fd 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6724,6 +6724,14 @@ cse_insn (insn, in_libcall_block)
       elt->in_memory = src_eqv_in_memory;
       elt->in_struct = src_eqv_in_struct;
       src_eqv_elt = elt;
+
+      /* Check to see if src_eqv_elt is the same as a set source which
+        does not yet have an elt, and if so set the elt of the set source
+        to src_eqv_elt.  */
+      for (i = 0; i < n_sets; i++)
+       if (sets[i].rtl && sets[i].src_elt == 0
+           && rtx_equal_p (SET_SRC (sets[i].rtl), src_eqv))
+         sets[i].src_elt = src_eqv_elt;
     }
 
   for (i = 0; i < n_sets; i++)