(expand_expr, case MIN_EXPR): If must emit multiple
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 25 Jan 1995 23:09:41 +0000 (15:09 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 25 Jan 1995 23:09:41 +0000 (15:09 -0800)
instructions, then don't allow a MEM target.

From-SVN: r8822

gcc/expr.c

index 785e74294e1ff21857791e8d605bbc0d46f46d10..7cc7d284ccc72e0fff9cee34be5c1b1d770fb65c 100644 (file)
@@ -5447,6 +5447,12 @@ expand_expr (exp, target, tmode, modifier)
       if (temp != 0)
        return temp;
 
+      /* At this point, a MEM target is no longer useful; we will get better
+        code without it.  */
+        
+      if (GET_CODE (target) == MEM)
+       target = gen_reg_rtx (mode);
+
       if (target != op0)
        emit_move_insn (target, op0);