[PATCH 01/29] [arm] Rip out DImode addition and subtraction splits.

Richard Earnshaw Richard.Earnshaw@arm.com
Fri Oct 18 19:49:00 GMT 2019


The first step towards early splitting of addition and subtraction at
DImode is to rip out the old patterns that are designed to propagate
DImode through the RTL optimization passes and the do late splitting.

This patch does cause some code size regressions, but it should still
execute correctly.  We will progressively add back the optimizations
we had here in later patches.

A small number of tests in the Arm-specific testsuite do fail as a
result of this patch, but that's to be expected, since the
optimizations they are looking for have just been removed.  I've kept
the tests, but XFAILed them for now.

One small technical change is also done in this patch as part of the
cleanup: the uaddv<mode>4 expander is changed to use LTU as the branch
comparison.  This eliminates the need for CC_Cmode to recognize
somewhat bogus equality constraints.

gcc:
	* arm.md (adddi3): Only accept register operands.
	(arm_adddi3): Convert to simple insn with no split.  Do not accept
	constants.
	(adddi_sesidi_di): Delete patern.
	(adddi_zesidi_di): Likewise.
	(uaddv<mode>4): Use LTU as condition for branch.
	(adddi3_compareV): Convert to simple insn with no split.
	(addsi3_compareV_upper): Delete pattern.
	(adddi3_compareC): Convert to simple insn with no split.  Correct
	flags setting expression.
	(addsi3_compareC_upper): Delete pattern.
	(addsi3_compareC): Correct flags setting expression.
	(subdi3_compare1): Convert to simple insn with no split.
	(subsi3_carryin_compare): Delete pattern.
	(arm_subdi3): Convert to simple insn with no split.
	(subdi_zesidi): Delete pattern.
	(subdi_di_sesidi): Delete pattern.
	(subdi_zesidi_di): Delete pattern.
	(subdi_sesidi_di): Delete pattern.
	(subdi_zesidi_zesidi): Delete pattern.
	(negvdi3): Use s_register_operand.
	(negdi2_compare): Convert to simple insn with no split.
	(negdi2_insn): Likewise.
	(negsi2_carryin_compare): Delete pattern.
	(negdi_zero_extendsidi): Delete pattern.
	(arm_cmpdi_insn): Convert to simple insn with no split.
	(negdi2): Don't call gen_negdi2_neon.
	* config/arm/neon.md (adddi3_neon): Delete pattern.
	(subdi3_neon): Delete pattern.
	(negdi2_neon): Delete pattern.
	(splits for negdi2_neon): Delete splits.

testsuite:
	* gcc.target/arm/negdi-3.c: Add XFAILS.
	* gcc.target/arm/pr3447-1.c: Likewise.
	* gcc.target/arm/pr3447-3.c: Likewise.
	* gcc.target/arm/pr3447-4.c: Likewise.
---
 gcc/config/arm/arm.c                     |   2 -
 gcc/config/arm/arm.md                    | 569 ++---------------------
 gcc/testsuite/gcc.target/arm/negdi-3.c   |   8 +-
 gcc/testsuite/gcc.target/arm/pr53447-1.c |   2 +-
 gcc/testsuite/gcc.target/arm/pr53447-3.c |   2 +-
 gcc/testsuite/gcc.target/arm/pr53447-4.c |   2 +-
 6 files changed, 56 insertions(+), 529 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-arm-Rip-out-DImode-addition-and-subtraction-splits.patch
Type: text/x-patch
Size: 29225 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191018/855da71b/attachment.bin>


More information about the Gcc-patches mailing list