OSDN Git Service

(expand_abs): When OP0 and TARGET are the same pseudo register, it is
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Aug 1996 03:12:40 +0000 (03:12 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Aug 1996 03:12:40 +0000 (03:12 +0000)
safe to use TARGET.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12619 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/optabs.c

index ba4b72f..8f4a640 100644 (file)
@@ -2118,6 +2118,13 @@ expand_abs (mode, op0, target, unsignedp, safe)
     }
 
   /* If that does not win, use conditional jump and negate.  */
+
+  /* It is safe to use the target if it is the same
+     as the source if this is also a pseudo register */
+  if (op0 == target && GET_CODE (op0) == REG
+      && REGNO (op0) >= FIRST_PSEUDO_REGISTER)
+    safe = 1;
+
   op1 = gen_label_rtx ();
   if (target == 0 || ! safe
       || GET_MODE (target) != mode