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]

[4.7 RFT PATCH, i386]: Backport recent LEA improvements to 4.7 branch


Hello!

Attached patch backports recent LEA improvements to 4.7 branch. The
patch unifies handling of LEA addresses with generic address handling,
allowing some more zero-extended addresses for both cases.

2012-XX-XX  Uros Bizjak  <ubizjak@gmail.com>

	Backport from mainline
	2012-07-24  Uros Bizjak  <ubizjak@gmail.com>

	PR target/53961
	* config/i386/i386.c (ix86_legitimate_address_p): Move check for
	negative constant address for TARGET_X32 ...
	(ix86_decompose_address): ... here.  Reject constant addresses
	that don't satisfy x86_64_immediate_operand predicate.

	2012-07-23  Uros Bizjak  <ubizjak@gmail.com>

	PR target/53961
	* config/i386/i386.md (*lea): Add asserts to detect invalid addresses.
	* config/i386/i386.c (ix86_print_operand_address): Ditto.
	(ix86_decompose_address): Allow (zero_extend:DI (subreg:SI (...)))
	addresses.  Prevent zero extensions of CONST_INT operands.

	2012-07-22  Uros Bizjak  <ubizjak@gmail.com>

	PR target/53961
	* config/i386/i386.md (*lea): New insn pattern.
	(*lea_1): Remove.
	(*lea<mode>_2): Ditto.
	(*lea_{3,4,5,6}_zext): Ditto.
	* config/i386/predicates.md (lea_address_operand): Do not reject
	zero-extended address operands.
	* config/i386/constraints.md (j): Remove address constraint.
	* config/i386/i386.c (ix86_decompose_address): Allow SImode subreg
	of an address.
	(ix86_print_operand_address): Handle SImode subreg of an address.
	(ix86_avoid_lea_for_addr): Reject zero-extended addresses for now.

	2012-03-09  Uros Bizjak  <ubizjak@gmail.com>

	PR target/52530
	* config/i386/i386.c (ix86_print_operand): Handle 'E' operand modifier.
	(ix86_print_operand_address): Handle UNSPEC_LEA_ADDR. Do not fallback
	to set code to 'q'.
	* config/i386/i386.md (UNSPEC_LEA_ADDR): New unspec.
	(*movdi_internal_rex64): Use %E operand modifier for lea.
	(*movsi_internal): Ditto.
	(*lea_1): Ditto.
	(*lea<mode>_2): Ditto.
	(*lea_{3,4,5,6}_zext): Ditto.
	(*tls_global_dynamic_32_gnu): Ditto.
	(*tls_global_dynamic_64): Ditto.
	(*tls_dynamic_gnu2_lea_32): Ditto.
	(*tls_dynamic_gnu2_lea_64): Ditto.
	(pro_epilogue_adjust_stack_<mode>_add): Ditto.

testsuite/ChangeLog:

2012-XX-XX  Uros Bizjak  <ubizjak@gmail.com>

	Backport from mainline
	2012-03-11  Uros Bizjak  <ubizjak@gmail.com>

	PR target/52530
	* gcc.dg/torture/pr52530.c: New test.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32} and various x32 compile tests. However, this patch needs
further testing on a real x32 target and maybe SPEC 2000/2006
benchmark for x86_64, i686 and x32 target. On mainline, this patch
works OK everywhere.

Uros.

Attachment: lea-47.diff.txt
Description: Text document


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