This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix regmove REG_EQUAL handling (PR rtl-optimization/46804)


On 12/08/10 09:42, Jakub Jelinek wrote:
Hi!

Bernd in 2001 fixed handling of REG_EQUIV and attempted to fix handling of
REG_EQUAL in optimize_reg_copy_3, unfortunately for the latter it wasn't
right - p at the end of the function is no longer the setter of src_reg,
but, as we walked again forwards, insn.  We don't want to drop REG_EQUAL
from insn, but from the setter.

This patch fixes it, and also, instead of dropping REG_EQUAL, tries to
replace it with sign or zero extension of it if the REG_EQUAL note was
the same as the original SET_SRC.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2010-12-08 Jakub Jelinek<jakub@redhat.com>

	PR rtl-optimization/46804
	* regmove.c (optimize_reg_copy_3): Look for REG_EQUAL note
	on the setter of src_reg rather than on insn.  If it is
	equal to the setter's original SET_SRC, replace it with its
	zero or sign extension instead of dropping it.

* gfortran.dg/pr46804.f90: New test.
OK. Thanks.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]