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, v2], Improve PowerPC switch behavior on medium code model system


This patch is a respin of the original patch.

I moved the support for the LWAX instruction in a separate patch, and it has
already been committed.

I added a test case for the switch code on PowerPC LE medium code.

I made the labelref insn not have a generator because there was no caller for
it (the labelref insn is created by the fwprop pass).

I did a bootstrap test on a little endian power8 system and there were no
regressions.  Can I commit this patch?  Assuming I put it into the tree, should
I back port it to GCC 8 and possibly GCC 7.

[gcc]
2018-08-29  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/predicates.md (label_ref_operand): New predicate
	to recognize LABEL_REF.
	* config/rs6000/rs6000.c (rs6000_output_addr_const_extra): Allow
	LABEL_REF's inside of UNSPEC_TOCREL's.
	* config/rs6000/rs6000.md (labelref): New insn to optimize loading
	a label address into registers on a medium code system.

[gcc/testsuite]
2018-08-29  Michael Meissner  <meissner@linux.ibm.com>

	* gcc.target/powerpc/switch-01.c: New test to verify that we use
	TOC commands to load the label address.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

Attachment: gcc-power9.patch309b
Description: Text document


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