------- Additional Comments From joern dot rennecke at st dot com 2005-09-22 17:37 ------- Subject: RFA: fix PR 23837 (Re: [4.0/4.1 regression] Wrong code with -fschedule-insns)
I have regtested the attached patch on i686-pc-linux-gnu in mainline from 2005-09-19 18:00 UTC. 2005-09-22 J"orn Rennecke <[EMAIL PROTECTED]> PR rtl-optimization/23837 * optabs.c (no_conflict_move_test): Don't set must_stay for a clobber / clobber match between dest and p->first. Index: optabs.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/optabs.c,v retrieving revision 1.291 diff -p -r1.291 optabs.c *** optabs.c 15 Sep 2005 21:51:13 -0000 1.291 --- optabs.c 22 Sep 2005 17:31:13 -0000 *************** no_conflict_move_test (rtx dest, rtx set *** 3021,3027 **** return; /* If this insn sets / clobbers a register that feeds one of the insns already in the list, this insn has to stay too. */ ! else if (reg_mentioned_p (dest, PATTERN (p->first)) || reg_used_between_p (dest, p->first, p->insn) /* Likewise if this insn depends on a register set by a previous insn in the list. */ --- 3021,3028 ---- return; /* If this insn sets / clobbers a register that feeds one of the insns already in the list, this insn has to stay too. */ ! else if (reg_overlap_mentioned_p (dest, PATTERN (p->first)) ! || (CALL_P (p->first) && (find_reg_fusage (p->first, USE, dest))) || reg_used_between_p (dest, p->first, p->insn) /* Likewise if this insn depends on a register set by a previous insn in the list. */ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23837