OSDN Git Service

* gcc.c-torture/compile/20021120-1.c: New test.
[pf3gnuchains/gcc-fork.git] / gcc / gcse.c
index 081275a..9e4cccb 100644 (file)
@@ -4251,6 +4251,7 @@ cprop_insn (insn, alter_jumps)
 
 /* LIBCALL_SP is a zero-terminated array of insns at the end of a libcall;
    their REG_EQUAL notes need updating.  */
+
 static bool
 do_local_cprop (x, insn, alter_jumps, libcall_sp)
      rtx x;
@@ -4260,10 +4261,12 @@ do_local_cprop (x, insn, alter_jumps, libcall_sp)
 {
   rtx newreg = NULL, newcnst = NULL;
 
-  /* Rule out USE instructions and ASM statements as we don't want to change the hard registers mentioned.  */
+  /* Rule out USE instructions and ASM statements as we don't want to
+     change the hard registers mentioned.  */
   if (GET_CODE (x) == REG
       && (REGNO (x) >= FIRST_PSEUDO_REGISTER
-          || (GET_CODE (PATTERN (insn)) != USE && asm_noperands (PATTERN (insn)) < 0)))
+          || (GET_CODE (PATTERN (insn)) != USE
+             && asm_noperands (PATTERN (insn)) < 0)))
     {
       cselib_val *val = cselib_lookup (x, GET_MODE (x), 0);
       struct elt_loc_list *l;
@@ -5291,7 +5294,7 @@ gcse_emit_move_after (src, dest, insn)
   else
     eqv = SET_SRC (set);
 
-  set_unique_reg_note (new, REG_EQUAL, copy_insn_1 (src));
+  set_unique_reg_note (new, REG_EQUAL, copy_insn_1 (eqv));
 
   return new;
 }