From patchwork Thu Jan 20 16:13:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Dapp X-Patchwork-Id: 50284 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 91E933857C76 for ; Thu, 20 Jan 2022 16:14:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91E933857C76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1642695257; bh=2u4eEYbz2gVW5c+laKvnJ0jUr4eZSB7dBeR8r3PcJhw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=fjU8towzA9X6x6mENSDDL9NemPLAknO9a66Zw2Q3U5s2abyMm9oCBhJn8tubStbWB dWmIHy18d9lUlExoeQlugS0Hh1N3z8+B5xbqqxolmZTiF44dQ1FBZVciaBewla0gi4 sMse13i5abKNXRi9MUkZEsQ+/jQKXGIM7y7cGzFA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id B01553858D37 for ; Thu, 20 Jan 2022 16:13:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B01553858D37 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20KFlqgQ008767 for ; Thu, 20 Jan 2022 16:13:44 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dqapnguae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 20 Jan 2022 16:13:44 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20KFvpGS015562 for ; Thu, 20 Jan 2022 16:13:41 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma01fra.de.ibm.com with ESMTP id 3dknwa12wp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 20 Jan 2022 16:13:41 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20KGDZIv41615820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Jan 2022 16:13:35 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5792BAE045; Thu, 20 Jan 2022 16:13:35 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 10976AE053; Thu, 20 Jan 2022 16:13:35 +0000 (GMT) Received: from [9.171.80.187] (unknown [9.171.80.187]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 20 Jan 2022 16:13:34 +0000 (GMT) Message-ID: <96f0e587-7cb3-ba8c-0474-d98f2fd65557@linux.ibm.com> Date: Thu, 20 Jan 2022 17:13:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Content-Language: en-US To: GCC Patches , Andreas Krebbel Subject: [PATCH] s390: Split CCSmode into CCSINT and CCSFP X-TM-AS-GCONF: 00 X-Proofpoint-GUID: riZEq5Bu58FKok9sxtrdhuEjy4h5UyPE X-Proofpoint-ORIG-GUID: riZEq5Bu58FKok9sxtrdhuEjy4h5UyPE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-20_06,2022-01-20_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201200083 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Robin Dapp via Gcc-patches From: Robin Dapp Reply-To: Robin Dapp Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi, this patch splits the CCSmode into an integer and a floating point variant. This allows ifcvt to consider floating point compares which would be rejected before because they could not be reversed. Bootstrapped and regtested on s390x. Is it OK? Regards Robin --- gcc/ChangeLog: * config/s390/predicates.md: Add CCSINTmode and CCSFPmode. * config/s390/s390-modes.def (UNORDERED): Likewise. (CC_MODE): Likewise. * config/s390/s390.cc (s390_cc_modes_compatible): Likewise. (s390_match_ccmode_set): Likewise. (s390_select_ccmode): Likewise. (s390_branch_condition_mask): Likewise. (s390_reverse_condition): Likewise. * config/s390/s390.h (REVERSIBLE_CC_MODE): Likewise. * config/s390/s390.md: Likewise. * config/s390/subst.md: Likewise. commit d3d4f8486340ff889de0dd709262f31953c54eda Author: Robin Dapp Date: Fri Jul 23 11:13:39 2021 +0200 s390: Split CCSmode in CCSINT and CCSFP. In order to be able to reverse condition codes, CCSmode needs to be split into CCSINT and CCSFP modes. Subsequently, we can add CCSFPmode to REVERSIBLE_CC_MODE. diff --git a/gcc/config/s390/predicates.md b/gcc/config/s390/predicates.md index 33194d3f3d6..ec47416cc1b 100644 --- a/gcc/config/s390/predicates.md +++ b/gcc/config/s390/predicates.md @@ -325,7 +325,8 @@ case E_CCURmode: return GET_CODE (op) == LTU; - case E_CCSmode: + case E_CCSINTmode: + case E_CCSFPmode: return GET_CODE (op) == UNGT; case E_CCSRmode: @@ -370,7 +371,8 @@ case E_CCURmode: return GET_CODE (op) == GEU; - case E_CCSmode: + case E_CCSINTmode: + case E_CCSFPmode: return GET_CODE (op) == LE; case E_CCSRmode: diff --git a/gcc/config/s390/s390-modes.def b/gcc/config/s390/s390-modes.def index b419907960e..eafe1e12938 100644 --- a/gcc/config/s390/s390-modes.def +++ b/gcc/config/s390/s390-modes.def @@ -48,12 +48,12 @@ CCUR: EQ GTU LTU NE (CLGF/R) Signed compares -CCS: EQ LT GT UNORDERED (LTGFR, LTGR, LTR, ICM/Y, - LTDBR, LTDR, LTEBR, LTER, +CCSINT: EQ LT GT UNORDERED (LTGFR, LTGR, LTR, ICM/Y, CG/R, C/R/Y, CGHI, CHI, - CDB/R, CD/R, CEB/R, CE/R, - ADB/R, AEB/R, SDB/R, SEB/R, SRAG, SRA, SRDA) +CCSFP: EQ LT GT UNORDERED (CDB/R, CD/R, CEB/R, CE/R, + LTDBR, LTDR, LTEBR, LTER, + ADB/R, AEB/R, SDB/R, SEB/R) CCSR: EQ GT LT UNORDERED (CGF/R, CH/Y) CCSFPS: EQ LT GT UNORDERED (KEB/R, KDB/R, KXBR, KDTR, KXTR, WFK) @@ -234,7 +234,8 @@ CC_MODE (CCL2); CC_MODE (CCL3); CC_MODE (CCU); CC_MODE (CCUR); -CC_MODE (CCS); +CC_MODE (CCSINT); +CC_MODE (CCSFP); CC_MODE (CCSR); CC_MODE (CCSFPS); CC_MODE (CCT); diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index f2e4474df99..0a93b4b39f4 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -1378,11 +1378,13 @@ s390_cc_modes_compatible (machine_mode m1, machine_mode m2) { case E_CCZmode: if (m2 == CCUmode || m2 == CCTmode || m2 == CCZ1mode - || m2 == CCSmode || m2 == CCSRmode || m2 == CCURmode) + || m2 == CCSINTmode || m2 == CCSFPmode + || m2 == CCSRmode || m2 == CCURmode) return m2; return VOIDmode; - case E_CCSmode: + case E_CCSINTmode: + case E_CCSFPmode: case E_CCUmode: case E_CCTmode: case E_CCSRmode: @@ -1422,7 +1424,8 @@ s390_match_ccmode_set (rtx set, machine_mode req_mode) switch (set_mode) { case E_CCZ1mode: - case E_CCSmode: + case E_CCSINTmode: + case E_CCSFPmode: case E_CCSRmode: case E_CCSFPSmode: case E_CCUmode: @@ -1445,7 +1448,8 @@ s390_match_ccmode_set (rtx set, machine_mode req_mode) break; case E_CCZmode: - if (req_mode != CCSmode && req_mode != CCUmode && req_mode != CCTmode + if (req_mode != CCSINTmode && req_mode != CCSFPmode + && req_mode != CCUmode && req_mode != CCTmode && req_mode != CCSRmode && req_mode != CCURmode && req_mode != CCZ1mode) return 0; @@ -1625,7 +1629,12 @@ s390_select_ccmode (enum rtx_code code, rtx op0, rtx op1) if ((GET_CODE (op0) == SIGN_EXTEND || GET_CODE (op0) == ZERO_EXTEND) && GET_CODE (op1) != CONST_INT) return CCSRmode; - return CCSmode; + if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_FLOAT + || GET_MODE_CLASS (GET_MODE (op0)) == MODE_DECIMAL_FLOAT) + return CCSFPmode; + else + return CCSINTmode; + break; case LTU: case GEU: @@ -2139,7 +2148,8 @@ s390_branch_condition_mask (rtx code) } break; - case E_CCSmode: + case E_CCSINTmode: + case E_CCSFPmode: case E_CCSFPSmode: switch (GET_CODE (code)) { @@ -6805,9 +6815,10 @@ s390_reverse_condition (machine_mode mode, enum rtx_code code) { /* Reversal of FP compares takes care -- an ordered compare becomes an unordered compare and vice versa. */ - if (mode == CCVFALLmode || mode == CCVFANYmode || mode == CCSFPSmode) + if (mode == CCVFALLmode || mode == CCVFANYmode || mode == CCSFPmode + || mode == CCSFPSmode) return reverse_condition_maybe_unordered (code); - else if (mode == CCVIALLmode || mode == CCVIANYmode) + else if (mode == CCVIALLmode || mode == CCVIANYmode || mode == CCSINTmode) return reverse_condition (code); else gcc_unreachable (); diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 5a64048a5a1..590853e97a9 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -530,7 +530,9 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv); FIXME: It might make sense to do this for other cc modes as well. */ #define REVERSIBLE_CC_MODE(MODE) \ ((MODE) == CCVIALLmode || (MODE) == CCVIANYmode \ - || (MODE) == CCVFALLmode || (MODE) == CCVFANYmode) + || (MODE) == CCVFALLmode || (MODE) == CCVFANYmode \ + || (MODE) == CCSFPmode || (MODE) == CCSINTmode \ + || (MODE) == CCSFPSmode) /* Given a condition code and a mode, return the inverse condition. */ #define REVERSE_CONDITION(CODE, MODE) s390_reverse_condition (MODE, CODE) diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 5eee8e86b42..73b983db300 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -975,7 +975,7 @@ (match_operand:DI 1 "const0_operand" ""))) (set (match_operand:DI 2 "register_operand" "=d,d") (sign_extend:DI (match_dup 0)))] - "s390_match_ccmode(insn, CCSmode) && TARGET_ZARCH" + "s390_match_ccmode(insn, CCSINTmode) && TARGET_ZARCH" "ltgfr\t%2,%0 ltgf\t%2,%0" [(set_attr "op_type" "RRE,RXY") @@ -989,7 +989,7 @@ (match_operand:GPR 1 "const0_operand" ""))) (set (match_operand:GPR 2 "register_operand" "=d,d") (match_dup 0))] - "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" + "s390_match_ccmode(insn, CCSINTmode) && TARGET_EXTIMM" "@ ltr\t%2,%0 lt\t%2,%0" @@ -1003,13 +1003,13 @@ (match_operand:GPR 2 "memory_operand")) (set (reg CC_REGNUM) (compare (match_dup 0) (match_operand:GPR 1 "const0_operand")))] - "s390_match_ccmode (peep2_next_insn (1), CCSmode) && TARGET_EXTIMM + "s390_match_ccmode (peep2_next_insn (1), CCSINTmode) && TARGET_EXTIMM && GENERAL_REG_P (operands[0]) && satisfies_constraint_T (operands[2]) && !contains_constant_pool_address_p (operands[2])" [(parallel - [(set (reg:CCS CC_REGNUM) - (compare:CCS (match_dup 2) (match_dup 1))) + [(set (reg:CCSINT CC_REGNUM) + (compare:CCSINT (match_dup 2) (match_dup 1))) (set (match_dup 0) (match_dup 2))])]) ; ltr, lt, ltgr, ltg @@ -1018,7 +1018,7 @@ (compare (match_operand:GPR 0 "nonimmediate_operand" "d,T") (match_operand:GPR 1 "const0_operand" ""))) (clobber (match_scratch:GPR 2 "=X,d"))] - "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" + "s390_match_ccmode(insn, CCSINTmode) && TARGET_EXTIMM" "@ ltr\t%0,%0 lt\t%2,%0" @@ -1031,7 +1031,7 @@ (match_operand:DI 1 "const0_operand" ""))) (set (match_operand:DI 2 "register_operand" "=d") (match_dup 0))] - "s390_match_ccmode(insn, CCSmode) && TARGET_ZARCH && !TARGET_EXTIMM" + "s390_match_ccmode(insn, CCSINTmode) && TARGET_ZARCH && !TARGET_EXTIMM" "ltgr\t%2,%0" [(set_attr "op_type" "RRE") (set_attr "z10prop" "z10_fr_E1")]) @@ -1042,7 +1042,7 @@ (match_operand:SI 1 "const0_operand" ""))) (set (match_operand:SI 2 "register_operand" "=d,d,d") (match_dup 0))] - "s390_match_ccmode(insn, CCSmode) && !TARGET_EXTIMM" + "s390_match_ccmode(insn, CCSINTmode) && !TARGET_EXTIMM" "@ ltr\t%2,%0 icm\t%2,15,%S0 @@ -1056,7 +1056,7 @@ (compare (match_operand:SI 0 "nonimmediate_operand" "d,Q,S") (match_operand:SI 1 "const0_operand" ""))) (clobber (match_scratch:SI 2 "=X,d,d"))] - "s390_match_ccmode(insn, CCSmode)" + "s390_match_ccmode(insn, CCSINTmode)" "@ ltr\t%0,%0 icm\t%2,15,%S0 @@ -1069,7 +1069,7 @@ [(set (reg CC_REGNUM) (compare (match_operand:DI 0 "register_operand" "d") (match_operand:DI 1 "const0_operand" "")))] - "s390_match_ccmode(insn, CCSmode) && !TARGET_ZARCH" + "s390_match_ccmode(insn, CCSINTmode) && !TARGET_ZARCH" "srda\t%0,0" [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) @@ -1079,7 +1079,7 @@ [(set (reg CC_REGNUM) (compare (match_operand:GPR 0 "register_operand" "d") (match_operand:GPR 1 "const0_operand" "")))] - "s390_match_ccmode(insn, CCSmode)" + "s390_match_ccmode(insn, CCSINTmode)" "ltr\t%0,%0" [(set_attr "op_type" "RR") (set_attr "z10prop" "z10_fr_E1")]) @@ -1134,7 +1134,7 @@ (match_operand:HQI 1 "const0_operand" ""))) (set (match_operand:HQI 2 "register_operand" "=d,d") (match_dup 0))] - "s390_match_ccmode(insn, CCSmode)" + "s390_match_ccmode(insn, CCSINTmode)" "@ icm\t%2,,%S0 icmy\t%2,,%S0" @@ -1147,7 +1147,7 @@ (compare (match_operand:HQI 0 "s_operand" "Q,S") (match_operand:HQI 1 "const0_operand" ""))) (clobber (match_scratch:HQI 2 "=d,d"))] - "s390_match_ccmode(insn, CCSmode)" + "s390_match_ccmode(insn, CCSINTmode)" "@ icm\t%2,,%S0 icmy\t%2,,%S0" @@ -1226,7 +1226,7 @@ [(set (reg CC_REGNUM) (compare (match_operand:HI 0 "s_operand" "Q") (match_operand:HI 1 "immediate_operand" "K")))] - "s390_match_ccmode(insn, CCSmode) && TARGET_Z10" + "s390_match_ccmode(insn, CCSINTmode) && TARGET_Z10" "chhsi\t%0,%1" [(set_attr "op_type" "SIL") (set_attr "z196prop" "z196_cracked")]) @@ -1250,7 +1250,7 @@ "d,d,Q, d,d,d,d") (match_operand:GPR 1 "general_operand" "d,K,K,Os,R,T,b")))] - "s390_match_ccmode(insn, CCSmode)" + "s390_match_ccmode(insn, CCSINTmode)" "@ cr\t%0,%1 chi\t%0,%h1 @@ -1462,7 +1462,7 @@ [(set (reg CC_REGNUM) (compare (match_operand:FP 0 "register_operand" "f") (match_operand:FP 1 "const0_operand")))] - "s390_match_ccmode (insn, CCSmode) + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT && !flag_trapping_math && !flag_signaling_nans" @@ -1476,7 +1476,7 @@ [(set (reg CC_REGNUM) (compare (match_operand:FP 0 "register_operand" "f,f,v,v") (match_operand:FP 1 "general_operand" "f,R,v,v")))] - "s390_match_ccmode(insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode(insn, CCSFPmode) && TARGET_HARD_FLOAT" "@ cr\t%0,%1 cb\t%0,%1 @@ -1491,7 +1491,7 @@ [(set (reg CC_REGNUM) (compare (match_operand:TF 0 "register_operand" "v") (match_operand:TF 1 "register_operand" "v")))] - "s390_match_ccmode(insn, CCSmode) && TARGET_VXE" + "s390_match_ccmode(insn, CCSFPmode) && TARGET_VXE" "wfcxb\t%0,%1" [(set_attr "op_type" "VRR") (set_attr "cpu_facility" "vxe")]) @@ -3932,7 +3932,7 @@ (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d") (unspec:SI [(match_dup 1)] UNSPEC_STRCMPCC_TO_INT))] - "s390_match_ccmode (insn, CCSmode)" + "s390_match_ccmode (insn, CCSINTmode)" "#" "&& reload_completed" [(set (match_dup 0) (ashift:SI (match_dup 0) (const_int 2))) @@ -3967,7 +3967,7 @@ (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d") (sign_extend:DI (unspec:SI [(match_dup 1)] UNSPEC_STRCMPCC_TO_INT)))] - "s390_match_ccmode (insn, CCSmode) && TARGET_ZARCH" + "s390_match_ccmode (insn, CCSINTmode) && TARGET_ZARCH" "#" "&& reload_completed" [(set (match_dup 0) (ashift:DI (match_dup 0) (const_int 34))) @@ -4260,7 +4260,7 @@ (set (match_operand:DI 0 "nonimmediate_operand" "=d,d") (ior:DI (and:DI (match_dup 1) (match_dup 2)) (and:DI (match_dup 3) (match_dup 4))))] - "TARGET_Z10 && s390_match_ccmode (insn, CCSmode) + "TARGET_Z10 && s390_match_ccmode (insn, CCSINTmode) && INTVAL (operands[2]) == ~INTVAL (operands[4])" "@ risbg\t%0,%1,%s2,%e2,0 @@ -4279,7 +4279,7 @@ (match_operand:DI 4 "const_int_operand" ""))) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] - "TARGET_Z10 && s390_match_ccmode (insn, CCSmode) + "TARGET_Z10 && s390_match_ccmode (insn, CCSINTmode) && INTVAL (operands[2]) == ~INTVAL (operands[4])" "@ risbg\t%0,%1,%s2,%e2,0 @@ -6225,7 +6225,7 @@ (match_operand:FP 3 "const0_operand" ""))) (set (match_operand:FP 0 "register_operand" "=f,f,f") (plus:FP (match_dup 1) (match_dup 2)))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "@ atr\t%0,%1,%2 abr\t%0,%2 @@ -6241,7 +6241,7 @@ (match_operand:FP 2 "general_operand" "f,f,R")) (match_operand:FP 3 "const0_operand" ""))) (clobber (match_scratch:FP 0 "=f,f,f"))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "@ atr\t%0,%1,%2 abr\t%0,%2 @@ -6670,7 +6670,7 @@ (match_operand:FP 3 "const0_operand" ""))) (set (match_operand:FP 0 "register_operand" "=f,f,f") (minus:FP (match_dup 1) (match_dup 2)))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "@ str\t%0,%1,%2 sbr\t%0,%2 @@ -6686,7 +6686,7 @@ (match_operand:FP 2 "general_operand" "f,f,R")) (match_operand:FP 3 "const0_operand" ""))) (clobber (match_scratch:FP 0 "=f,f,f"))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "@ str\t%0,%1,%2 sbr\t%0,%2 @@ -8877,7 +8877,7 @@ (match_operand:BFP 2 "const0_operand" ""))) (set (match_operand:BFP 0 "register_operand" "=f") (neg:BFP (match_dup 1)))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "lcbr\t%0,%1" [(set_attr "op_type" "RRE") (set_attr "type" "fsimp")]) @@ -8888,7 +8888,7 @@ (compare (neg:BFP (match_operand:BFP 1 "register_operand" "f")) (match_operand:BFP 2 "const0_operand" ""))) (clobber (match_scratch:BFP 0 "=f"))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "lcbr\t%0,%1" [(set_attr "op_type" "RRE") (set_attr "type" "fsimp")]) @@ -9002,7 +9002,7 @@ (match_operand:BFP 2 "const0_operand" ""))) (set (match_operand:BFP 0 "register_operand" "=f") (abs:BFP (match_dup 1)))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "lpbr\t%0,%1" [(set_attr "op_type" "RRE") (set_attr "type" "fsimp")]) @@ -9013,7 +9013,7 @@ (compare (abs:BFP (match_operand:BFP 1 "register_operand" "f")) (match_operand:BFP 2 "const0_operand" ""))) (clobber (match_scratch:BFP 0 "=f"))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "lpbr\t%0,%1" [(set_attr "op_type" "RRE") (set_attr "type" "fsimp")]) @@ -9118,7 +9118,7 @@ (match_operand:BFP 2 "const0_operand" ""))) (set (match_operand:BFP 0 "register_operand" "=f") (neg:BFP (abs:BFP (match_dup 1))))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "lnbr\t%0,%1" [(set_attr "op_type" "RRE") (set_attr "type" "fsimp")]) @@ -9129,7 +9129,7 @@ (compare (neg:BFP (abs:BFP (match_operand:BFP 1 "register_operand" "f"))) (match_operand:BFP 2 "const0_operand" ""))) (clobber (match_scratch:BFP 0 "=f"))] - "s390_match_ccmode (insn, CCSmode) && TARGET_HARD_FLOAT" + "s390_match_ccmode (insn, CCSFPmode) && TARGET_HARD_FLOAT" "lnbr\t%0,%1" [(set_attr "op_type" "RRE") (set_attr "type" "fsimp")]) @@ -9681,9 +9681,9 @@ [(set (match_dup 4) (match_dup 1)) (parallel [(set (match_dup 4) (plus:DI (match_dup 4) (subreg:DI (match_dup 2) 0))) (clobber (reg:CC CC_REGNUM))]) - (set (reg:CCS CC_REGNUM) (compare:CCS (match_dup 4) (subreg:DI (match_dup 2) 8))) + (set (reg:CCSINT CC_REGNUM) (compare:CCSINT (match_dup 4) (subreg:DI (match_dup 2) 8))) (set (match_dup 3) (match_dup 4)) - (set (pc) (if_then_else (match_op_dup 5 [(reg:CCS CC_REGNUM) (const_int 0)]) + (set (pc) (if_then_else (match_op_dup 5 [(reg:CCSINT CC_REGNUM) (const_int 0)]) (label_ref (match_dup 0)) (pc)))] "" @@ -9724,9 +9724,9 @@ [(set (match_dup 4) (match_dup 1)) (parallel [(set (match_dup 4) (plus:SI (match_dup 4) (subreg:SI (match_dup 2) 4))) (clobber (reg:CC CC_REGNUM))]) - (set (reg:CCS CC_REGNUM) (compare:CCS (match_dup 4) (subreg:SI (match_dup 2) 12))) + (set (reg:CCSINT CC_REGNUM) (compare:CCSINT (match_dup 4) (subreg:SI (match_dup 2) 12))) (set (match_dup 3) (match_dup 4)) - (set (pc) (if_then_else (match_op_dup 5 [(reg:CCS CC_REGNUM) (const_int 0)]) + (set (pc) (if_then_else (match_op_dup 5 [(reg:CCSINT CC_REGNUM) (const_int 0)]) (label_ref (match_dup 0)) (pc)))] "" @@ -9767,9 +9767,9 @@ [(set (match_dup 4) (match_dup 1)) (parallel [(set (match_dup 4) (plus:SI (match_dup 4) (subreg:SI (match_dup 2) 0))) (clobber (reg:CC CC_REGNUM))]) - (set (reg:CCS CC_REGNUM) (compare:CCS (match_dup 4) (subreg:SI (match_dup 2) 4))) + (set (reg:CCSINT CC_REGNUM) (compare:CCSINT (match_dup 4) (subreg:SI (match_dup 2) 4))) (set (match_dup 3) (match_dup 4)) - (set (pc) (if_then_else (match_op_dup 5 [(reg:CCS CC_REGNUM) (const_int 0)]) + (set (pc) (if_then_else (match_op_dup 5 [(reg:CCSINT CC_REGNUM) (const_int 0)]) (label_ref (match_dup 0)) (pc)))] "" diff --git a/gcc/config/s390/subst.md b/gcc/config/s390/subst.md index 1ab704305a8..e55311bd4d7 100644 --- a/gcc/config/s390/subst.md +++ b/gcc/config/s390/subst.md @@ -28,7 +28,7 @@ [(set (match_operand:DSI 0 "" "") (match_operand:DSI 1 "" "")) (clobber (reg:CC CC_REGNUM))] - "s390_match_ccmode(insn, CCSmode)" + "s390_match_ccmode(insn, CCSINTmode)" [(set (reg CC_REGNUM) (compare (match_dup 1) (const_int 0))) (set (match_dup 0) (match_dup 1))]) @@ -42,7 +42,7 @@ [(set (match_operand:DSI 0 "" "") (match_operand:DSI 1 "" "")) (clobber (reg:CC CC_REGNUM))] - "s390_match_ccmode(insn, CCSmode)" + "s390_match_ccmode(insn, CCSINTmode)" [(set (reg CC_REGNUM) (compare (match_dup 1) (const_int 0))) (clobber (match_scratch:DSI 0 "=d"))])