diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-08-11 23:12:40 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-08-11 23:12:40 -0400 |
commit | 5c0bf7476e6547500e2492ef67be94589078cb67 (patch) | |
tree | 085f67761cefcad68c3c4420adbadf029836fbca /gcc | |
parent | 68342d36e0e10ace40fc1927ca2645e4b2b137fc (diff) | |
download | gcc-5c0bf7476e6547500e2492ef67be94589078cb67.zip gcc-5c0bf7476e6547500e2492ef67be94589078cb67.tar.gz gcc-5c0bf7476e6547500e2492ef67be94589078cb67.tar.bz2 |
(expand_abs): When OP0 and TARGET are the same pseudo register, it is
safe to use TARGET.
From-SVN: r12619
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/optabs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index ba4b72f..8f4a640 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -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 |