cris: Enable extend operations to SImode to set condition codes.

Enable dropping of compares with zero of the result, through the
three CCmode substitutions and the cmpelim pass.

gcc:
	* config/cris/cris.md
	("<acc><anz><anzvc>extend<mode>si2<setcc><setnz><setnzvc>"):
	Rename from "extend<mode>si2".
	("<acc><anz><anzvc>zero_extend<mode>si2<setcc><setnz><setnzvc>"):
	Similar, from "zero_extend<mode>si2".
This commit is contained in:
Hans-Peter Nilsson 2020-01-31 08:24:43 +01:00
parent 3c7016b08f
commit 61c964c7fd
2 changed files with 6 additions and 2 deletions

View File

@ -120,6 +120,10 @@
("*b<zcond:code><mode>"): Rename from "b<zcond:code><mode>".
("*b<nzvccond:code><mode>"): Rename from "b<nzvccond:code><mode>".
("*b<rnzcond:code><mode>"): Rename from "*b<rnzcond:code><mode>".
("<acc><anz><anzvc>extend<mode>si2<setcc><setnz><setnzvc>"):
Rename from "extend<mode>si2".
("<acc><anz><anzvc>zero_extend<mode>si2<setcc><setnz><setnzvc>"):
Similar, from "zero_extend<mode>si2".
2020-05-08 Vladimir Makarov <vmakarov@redhat.com>

View File

@ -856,7 +856,7 @@
""
"movs<m> %1,%M0\;smi %H0\;neg.d %H0,%H0")
(define_insn "extend<mode>si2"
(define_insn "<acc><anz><anzvc>extend<mode>si2<setcc><setnz><setnzvc>"
[(set (match_operand:SI 0 "register_operand" "=r,r,r")
(sign_extend:SI (match_operand:BW 1 "general_operand" "r,Q>,g")))
(clobber (reg:CC CRIS_CC0_REGNUM))]
@ -879,7 +879,7 @@
;; Zero-extend. The DImode ones are synthesized by gcc, so we don't
;; specify them here.
(define_insn "zero_extend<mode>si2"
(define_insn "<acc><anz><anzvc>zero_extend<mode>si2<setcc><setnz><setnzvc>"
[(set (match_operand:SI 0 "register_operand" "=r,r,r")
(zero_extend:SI
(match_operand:BW 1 "nonimmediate_operand" "r,Q>,m")))