Index: reorg.c
===================================================================
--- reorg.c	(revision 192573)
+++ reorg.c	(working copy)
@@ -1179,6 +1179,19 @@ check_annul_list_true_false (int annul_t
   return 1;
 }
 
+/* Copy INSN, which is to remain in place (in fill_slots_from_thread parlance,
+   it is from a thread we don't own), for use in a delay slot.  */
+static rtx
+copy_delay_slot_insn (rtx insn)
+{
+  /* Copy INSN with its rtx_code, all its notes, location etc.  */
+  insn = copy_rtx (insn);
+  /* Get new UID.  */
+  rtx new_insn = make_insn_raw (PATTERN (insn));
+  INSN_UID (insn) = INSN_UID (new_insn);
+  return insn;
+}
+
 /* INSN branches to an insn whose pattern SEQ is a SEQUENCE.  Given that
    the condition tested by INSN is CONDITION and the resources shown in
    OTHER_NEEDED are needed after INSN, see whether INSN can take all the insns
@@ -1297,7 +1310,7 @@ steal_delay_list_from_target (rtx insn,
 	{
 	  if (must_annul)
 	    used_annul = 1;
-	  temp = copy_rtx (trial);
+	  temp = copy_delay_slot_insn (trial);
 	  INSN_FROM_TARGET_P (temp) = 1;
 	  new_delay_list = add_to_delay_list (temp, new_delay_list);
 	  total_slots_filled++;
@@ -2369,7 +2382,8 @@ fill_simple_delay_slots (int non_jumps_p
 	      if (new_label)
 	        {
 		  delay_list
-		    = add_to_delay_list (copy_rtx (next_trial), delay_list);
+		    = add_to_delay_list (copy_delay_slot_insn (next_trial),
+					 delay_list);
 		  slots_filled++;
 		  reorg_redirect_jump (trial, new_label);
 
@@ -2793,7 +2807,7 @@ fill_slots_from_thread (rtx insn, rtx co
 		  else
 		    new_thread = next_active_insn (trial);
 
-		  temp = own_thread ? trial : copy_rtx (trial);
+		  temp = own_thread ? trial : copy_delay_slot_insn (trial);
 		  if (thread_if_true)
 		    INSN_FROM_TARGET_P (temp) = 1;
 
@@ -2974,7 +2988,7 @@ fill_slots_from_thread (rtx insn, rtx co
 	  else
 	    new_thread = next_active_insn (trial);
 
-	  ninsn = own_thread ? trial : copy_rtx (trial);
+	  ninsn = own_thread ? trial : copy_delay_slot_insn (trial);
 	  if (thread_if_true)
 	    INSN_FROM_TARGET_P (ninsn) = 1;
 
