(convert_move): When emit multiword conversion, force FROM into a new
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 1 Dec 1994 00:07:49 +0000 (19:07 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 1 Dec 1994 00:07:49 +0000 (19:07 -0500)
pseudo-reg if it overlaps TO.

From-SVN: r8593

gcc/expr.c

index 4c2ac5470d72f0cf3e504039fe0e02184ab3109d..f109293e62f4dc1165a16be8098766e0888fcc21 100644 (file)
@@ -916,6 +916,12 @@ convert_move (to, from, unsignedp)
       /* No special multiword conversion insn; do it by hand.  */
       start_sequence ();
 
+      /* Since we will turn this into a no conflict block, we must ensure
+        that the source does not overlap the target.  */
+
+      if (reg_overlap_mentioned_p (to, from))
+       from = force_reg (from_mode, from);
+
       /* Get a copy of FROM widened to a word, if necessary.  */
       if (GET_MODE_BITSIZE (from_mode) < BITS_PER_WORD)
        lowpart_mode = word_mode;