[arm] Improve code generation for addvsi4.
commitdbba8a1707ffe25375282e0a075e7dff8d41ef90
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 18 Oct 2019 19:04:22 +0000 (18 19:04 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 18 Oct 2019 19:04:22 +0000 (18 19:04 +0000)
tree6d0dd78d6210cfc25121db8d034baa59936ed1aa
parentdeb254e029c9430a0c3d0cb044e4ca7b3f15b619
[arm] Improve code generation for addvsi4.

Similar to the improvements for uaddvsi4, this patch improves the code
generation for addvsi4 to handle immediates and to add alternatives
that better target thumb2.  To do this we separate out the expansion
of uaddvsi4 from that of uaddvdi4 and then add an additional pattern
to handle constants.  Also, while doing this I've fixed the incorrect
usage of NE instead of COMPARE in the generated RTL.

* config/arm/arm.md (addv<mode>4): Delete.
(addvsi4): New pattern.  Handle immediate values that the architecture
supports.
(addvdi4): New pattern.
(addsi3_compareV): Rename to ...
(addsi3_compareV_reg): ... this.  Add constraints for thumb2 variants
and use COMPARE rather than NE.
(addsi3_compareV_imm): New pattern.
* config/arm/arm.c (arm_select_cc_mode): Return CC_Vmode for
a signed-overflow check.

From-SVN: r277184
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.md