cris: Enable general "and", "or", "xor", "not" to set condition codes.
authorHans-Peter Nilsson <hp@axis.com>
Sun, 2 Feb 2020 11:57:12 +0000 (12:57 +0100)
committerHans-Peter Nilsson <hp@axis.com>
Sat, 9 May 2020 02:14:26 +0000 (04:14 +0200)
commit730cafefe6b96ddacfd1c2145b39dde68bed4f4f
treefed3489dd3558feef1bf4b28b1dc2c767f3244a8
parente561b9fe0b4b3702e18b7bf12f03b1fbe0d111b4
cris: Enable general "and", "or", "xor", "not" to set condition codes.

Enabling dropping of compares with zero of the result, through
any CCmode substitution.  Beware that this will cause
size-suboptimal operands to appear for e.g. 32-bit "and":
-65536, -256, 255, 65535; for 16-bit "and" -256, -31..-1, 255;
for 8-bit "and" -31..-1.  Fixed for 0..31 for 16- and 8-bit
sizes as it seemed worthwhile and used in libgcc.

gcc:
* config/cris/cris.md ("*expanded_andsi<setcc><setnz><setnzvc>"):
Rename from "*expanded_andsi".
("*iorsi3<setcc><setnz><setnzvc>"): Similar from "*iorsi3".
Decorate "cc" attribute to make "cc<cccc><ccnz><ccnzvc>".
("*iorhi3<setcc><setnz><setnzvc>"): Similar from "*iorhi3".
("*iorqi3<setcc><setnz><setnzvc>"): Similar from "*iorqi3".
("*expanded_andhi<setcc><setnz><setnzvc>"): Similar from
"*expanded_andhi".  Add quick cc-setting alternative for 0..31.
("*andqi3<setcc><setnz><setnzvc>"): Similar from "*andqi3".
("<acc><anz><anzvc>xorsi3<setcc><setnz><setnzvc>"): Rename
from "xorsi3".
("<acc><anz><anzvc>one_cmplsi2<setcc><setnz><setnzvc>"): Rename
from "one_cmplsi2".
gcc/ChangeLog
gcc/config/cris/cris.md