cris: Enable additions and subtractions to set condition codes.
authorHans-Peter Nilsson <hp@axis.com>
Fri, 31 Jan 2020 15:03:15 +0000 (16:03 +0100)
committerHans-Peter Nilsson <hp@axis.com>
Sat, 9 May 2020 02:12:03 +0000 (04:12 +0200)
commite561b9fe0b4b3702e18b7bf12f03b1fbe0d111b4
tree2b35a8eeb1b11696e3d1c9fbba926f7ccb005422
parent61c964c7fd2ad96cec262a2bcd1fc13bd2e2eff8
cris: Enable additions and subtractions to set condition codes.

Enabling dropping of compares with zero of the result, through
the non-VC-setting CCmode substitution.  Beware that the
substitutions for 8- and 16-bit patterns will in some cases be
size-neutral; e.g. replacing an "addq 1..63,$rN" + "test.w $rN"
or "subq 1..63,$rN" + "test.w $rN" with an "add.w -63..63,$rN".

gcc:
* config/cris/cris.md ("*adddi3<setnz>"): Rename from "*adddi3".
cris: Enable 32-bit addition to set condition codes.
("*subdi3<setnz>"): Similarly from "*subdi3".
("*addsi3<setnz>"): Similarly from "*addsi3".
("*subsi3<setnz>"): Similarly from "*subsi3".
("*addhi3<setnz>"): Similarly from "*addhi3" and decorate the
"cc" attribute to "cc<ccnz>".
("*addqi3<setnz>"): Similarly from "*addqi3".
("*sub<mode>3<setnz>"): Similarly from "*sub<mode>3".
gcc/ChangeLog
gcc/config/cris/cris.md