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]

[PATCH, reload] Fix bug pr52804, RELOAD pass reloads wrong register on ARM for cortex-m0


Hi,
Previously I reported pr52804 in bugzilla about reload pass reloads wrong
register.
After investigation I believe it is a bug in reload pass and here comes the
patch.
You can refer to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52804 for
details.

In short, I think the confliction of reloads with type
RELOAD_FOR_INPADDR_ADDRESS
and type RELOAD_FOR_INPUT_ADDRESS should be handled in
"reload_reg_reaches_end_p".
Also I think RELOAD_FOR_OUTPUT_ADDRESS/RELOAD_FOR_OUTADDR_ADDRESS have the
issue
symmetrically, though I have no test case for it.

I have tested the patch for x86 and arm. Is it OK?

I think it is a bug of reload, and I understand reload pass should be rarely
touched,
so any comments are highly appreciated on this topic.

Thanks very much.


2012-04-20  Bin Cheng  <bin.cheng@arm.com>

	PR target/52804
	* reload1.c (reload_reg_reaches_end_p): Check whether successor
reload with
	type RELOAD_FOR_INPUT_ADDRESS kills reload register of current one
with type
	RELOAD_FOR_INPADDR_ADDRESS.

Attachment: pr52804-20120420.txt
Description: Text document


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