From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id DD9133858D3C for ; Wed, 19 Oct 2022 06:22:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD9133858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29J6FAbW006003 for ; Wed, 19 Oct 2022 06:22:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : to : from : subject : content-type : content-transfer-encoding; s=pp1; bh=OnzPsjjuCDpF9u6RIt5Ggv/7/2SCPSqP0+VtBSN9frI=; b=kSMaq4OW2oTwXlpmLHjORHvtW0KZz3/Lio7vcBCUKjDe83W6fGSllTRa1LaY0fXgTudw IIw1+mmapx/i6ryiITHzX9EoGCubEQRQK30NJU6UCwu+linfXJzmOK4qYVtl+hQygiVA VlNSbkT+rIYpdsT1IkwjvJTqgLEkz4706dpgdOu/ZP3M4broUxj7DZaaQ4LJMwARuvTT SQWqjVb/3Fu3i4JNAYECM2yw5HzCbBq7p9Sn/P6h4IZktmFw68HLJTOurMTKaEI7X+us IJxyQhHUd8/RaHP7CCp1HTRDh46CuBK/FQM58/AY8T0HiCsvnfqBG4ZO/9Tyb2YeTEbE 1g== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kabt485n4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Oct 2022 06:22:17 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29J6LELT028236 for ; Wed, 19 Oct 2022 06:22:15 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3k7m4jphx5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Oct 2022 06:22:15 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29J6MBJ464946438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Oct 2022 06:22:12 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8C6D52050; Wed, 19 Oct 2022 06:22:11 +0000 (GMT) Received: from [9.171.17.149] (unknown [9.171.17.149]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id AD4F05204E; Wed, 19 Oct 2022 06:22:11 +0000 (GMT) Message-ID: Date: Wed, 19 Oct 2022 08:22:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Content-Language: en-US To: GCC Patches , Andreas Krebbel From: Robin Dapp Subject: [PATCH] s390: Fix bootstrap error with checking and -m31 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: XOE1RD6hxsc01wTUZys_-RCQ3AE7JHB4 X-Proofpoint-GUID: XOE1RD6hxsc01wTUZys_-RCQ3AE7JHB4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-19_02,2022-10-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 clxscore=1015 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210190033 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, since r13-2746 we hit an ICE when bootstrapping with -m31 and --enable-checking=all. ../../../../libgfortran/ieee/ieee_helper.c: In function 'ieee_class_helper_16': ../../../../libgfortran/ieee/ieee_helper.c:77:3: internal compiler error: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1932 77 | } | ^ ../../../../libgfortran/ieee/ieee_helper.c:87:1: note: in expansion of macro 'CLASSMACRO' 87 | CLASSMACRO(16) | ^~~~~~~~~~ This patch fixes the problem by first checking for reload_completed and also ensuring that REGNO is only called on reg operands rather than subregs. Bootstrapped and regtested --with-arch=arch14 and --enable-checking=all. Is it OK? Regards Robin -- gcc/ChangeLog: * config/s390/s390.md: Move reload_completed and check operands for REG_P. --- gcc/config/s390/s390.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 962927c31126..c89b15cf4f3c 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -8797,9 +8797,10 @@ (define_split (neg:DI (match_operand:DI 1 "register_operand" ""))) (clobber (reg:CC CC_REGNUM))] "!TARGET_ZARCH - && (REGNO (operands[0]) == REGNO (operands[1]) - || s390_split_ok_p (operands[0], operands[1], DImode, 0)) - && reload_completed" + && reload_completed + && ((REG_P (operands[0]) && REG_P (operands[1]) + && REGNO (operands[0]) == REGNO (operands[1])) + || s390_split_ok_p (operands[0], operands[1], DImode, 0))" [(parallel [(set (match_dup 2) (neg:SI (match_dup 3))) (clobber (reg:CC CC_REGNUM))]) -- 2.31.1