]> git.ipfire.org Git - thirdparty/gcc.git/commit
[arm] early split most DImode comparison operations.
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Oct 2019 19:03:43 +0000 (19:03 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Oct 2019 19:03:43 +0000 (19:03 +0000)
commit060a96ad617c21ed3419b38c46a61b001be3705c
tree94de7034a2c5cbea058927af8f467102b05226f4
parentd6852b4754ab01c95fded5453fd9fa93dbb7ea94
[arm] early split most DImode comparison operations.

This patch does most of the work for early splitting the DImode
comparisons.  We now handle EQ, NE, LT, GE, LTU and GEU during early
expansion, in addition to EQ and NE, for which the expansion has now
been reworked to use a standard conditional-compare pattern already in
the back-end.

To handle this we introduce two new condition flag modes that are used
when comparing the upper words of decomposed DImode values: one for
signed, and one for unsigned comparisons.  CC_Bmode (B for Borrow) is
essentially the inverse of CC_Cmode and is used when the carry flag is
set by a subtraction of unsigned values.

* config/arm/arm-modes.def (CC_NV, CC_B): New CC modes.
* config/arm/arm.c (arm_select_cc_mode): Recognize constructs that
need these modes.
(arm_gen_dicompare_reg): New code to early expand the sub-operations
of EQ, NE, LT, GE, LTU and GEU.
* config/arm/iterators.md (CC_EXTEND): New code attribute.
* config/arm/predicates.md (arm_adcimm_operand): New predicate..
* config/arm/arm.md (cmpsi3_carryin_<CC_EXTEND>out): New pattern.
(cmpsi3_imm_carryin_<CC_EXTEND>out): Likewise.
(cmpsi3_0_carryin_<CC_EXTEND>out): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277179 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arm/arm-modes.def
gcc/config/arm/arm.c
gcc/config/arm/arm.md
gcc/config/arm/iterators.md
gcc/config/arm/predicates.md