diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-01-16 08:20:15 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-01-16 08:20:15 -0500 |
commit | 3e53ea486098443845e08949c446679f3a59362e (patch) | |
tree | eb56a5ccaa4511359e990d57073f59e03c78d0bb /gcc | |
parent | 995d54ddbc5737e5d5158106885f1d87d64299bb (diff) | |
download | gcc-3e53ea486098443845e08949c446679f3a59362e.zip gcc-3e53ea486098443845e08949c446679f3a59362e.tar.gz gcc-3e53ea486098443845e08949c446679f3a59362e.tar.bz2 |
(expand_fix): Don't copy TARGET to TO if same.
From-SVN: r11017
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/optabs.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index cae4c4e..a2bad29 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1,5 +1,5 @@ /* Expand the basic unary and binary arithmetic operations, for GNU compiler. - Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. This file is part of GNU CC. @@ -3884,10 +3884,19 @@ expand_fix (to, from, unsignedp) GET_MODE (to), from)); } - if (GET_MODE (to) == GET_MODE (target)) - emit_move_insn (to, target); - else - convert_move (to, target, 0); + /* Do NOT copy, if "to" is the same as "target". See + expand_float(). It used to cause a bogus "clobber" of the + input, causing it's ancestors to be deleted. Hopefully the call + is just unnecessary now, causing extra time in optimization, or + some extra instructions. + / Hans-Peter.Nilsson@axis.se */ + if (target != to) + { + if (GET_MODE (to) == GET_MODE (target)) + emit_move_insn (to, target); + else + convert_move (to, target, 0); + } } static optab |