From 61c964c7fd2ad96cec262a2bcd1fc13bd2e2eff8 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Fri, 31 Jan 2020 08:24:43 +0100 Subject: [PATCH] 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 ("extendsi2"): Rename from "extendsi2". ("zero_extendsi2"): Similar, from "zero_extendsi2". --- gcc/ChangeLog | 4 ++++ gcc/config/cris/cris.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22178ad52ce..f0800fe1b19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -120,6 +120,10 @@ ("*b"): Rename from "b". ("*b"): Rename from "b". ("*b"): Rename from "*b". + ("extendsi2"): + Rename from "extendsi2". + ("zero_extendsi2"): + Similar, from "zero_extendsi2". 2020-05-08 Vladimir Makarov diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index 5f77bc9e0fd..2f3f328f5c5 100644 --- a/gcc/config/cris/cris.md +++ b/gcc/config/cris/cris.md @@ -856,7 +856,7 @@ "" "movs %1,%M0\;smi %H0\;neg.d %H0,%H0") -(define_insn "extendsi2" +(define_insn "extendsi2" [(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_extendsi2" +(define_insn "zero_extendsi2" [(set (match_operand:SI 0 "register_operand" "=r,r,r") (zero_extend:SI (match_operand:BW 1 "nonimmediate_operand" "r,Q>,m"))) -- 2.30.2