[PATCH 4/5][Arm] New pattern for CSNEG instructions
authorSudi Das <sudi.das@arm.com>
Fri, 18 Sep 2020 15:31:12 +0000 (16:31 +0100)
committerOmar Tahir <omar.tahir@arm.com>
Fri, 18 Sep 2020 16:05:05 +0000 (17:05 +0100)
commit04dc198ce5508b2329c83cda7c0cd9bce4ed83bb
tree7bbf3f78f23ad2fec798915b6e18b5b5d2a5ae1f
parent778f19ff953792702c0a7e1fde00214709d9317e
[PATCH 4/5][Arm] New pattern for CSNEG instructions

This patch adds a new pattern, *thumb2_csneg, for generating CSNEG
instructions. It also restricts *if_neg_move and *thumb2_negscc to only match
if !TARGET_COND_ARITH which prevents undesirable matches during ifcvt.

gcc/ChangeLog:

* config/arm/thumb2.md (*thumb2_csneg): New.
(*thumb2_negscc): Don't match if TARGET_COND_ARITH.
* config/arm/arm.md (*if_neg_move): Don't match if TARGET_COND_ARITH.

gcc/testsuite/ChangeLog:

* gcc.target/arm/csneg.c: New test.

Co-authored-by: Omar Tahir <omar.tahir@arm.com>
gcc/config/arm/arm.md
gcc/config/arm/thumb2.md
gcc/testsuite/gcc.target/arm/csneg.c [new file with mode: 0644]