From 3721581af164ecdc50346c435a098d4ea806d66c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 11 May 2001 22:08:04 +0200 Subject: regmove.c (regmove_optimize): Suppress the optimization for unchanging destination register. * regmove.c (regmove_optimize): Suppress the optimization for unchanging destination register. Add comment above function. From-SVN: r41974 --- gcc/regmove.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc/regmove.c') diff --git a/gcc/regmove.c b/gcc/regmove.c index a151d6f2320..910c422ee4f 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -1060,6 +1060,12 @@ fixup_match_2 (insn, dst, src, offset, regmove_dump_file) return 0; } +/* Main entry for the register move optimization. + F is the first instruction. + NREGS is one plus the highest pseudo-reg number used in the instruction. + REGMOVE_DUMP_FILE is a stream for output of a trace of actions taken + (or 0 if none should be output). */ + void regmove_optimize (f, nregs, regmove_dump_file) rtx f; @@ -1282,7 +1288,8 @@ regmove_optimize (f, nregs, regmove_dump_file) if (GET_CODE (dst) != REG || REGNO (dst) < FIRST_PSEUDO_REGISTER - || REG_LIVE_LENGTH (REGNO (dst)) < 0) + || REG_LIVE_LENGTH (REGNO (dst)) < 0 + || RTX_UNCHANGING_P (dst)) continue; /* If the operands already match, then there is nothing to do. */ -- cgit v1.2.1