From patchwork Wed Oct 19 06:22:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Dapp X-Patchwork-Id: 4445 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp158745wrs; Tue, 18 Oct 2022 23:23:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HqBQhhGHOe3gC2S67cP/QRJMQZlVURAtIx40K+MUcisSovTlb/mo+2PxzDJSlYO2DgGf7 X-Received: by 2002:a17:907:8a24:b0:78d:cd60:1022 with SMTP id sc36-20020a1709078a2400b0078dcd601022mr5363780ejc.384.1666160584677; Tue, 18 Oct 2022 23:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666160584; cv=none; d=google.com; s=arc-20160816; b=E7biUtfw/ilS6Fi8KzyoQALJ4r6b3IHJxKHGzhH1pVIObRv51R7CHA8nAEybfRW59p 3cmhm1iQsR0NgbDCf0dbZRJZDIWFoRsQa+ZZrIQUMDVuZtiBybCundClhta6y8uEhxKf mZ7RmDCQnBeLDW0neyQuwUmVAuwrj0sSm4HSeqqwkDO4tU/cCXtRqAP76Vorg2fpzWtp ksch6wAoQU+1DZg8hXybS7gfVL2hjGXXnBIjS1ZtVVL42v35fv9kPGw04ISrz+RYofFF rH8D2Xs18nfvoKNA87KixYgU2IHX0QFsx4NyxZ1Y8XrCNS4U85tDiaLPG+0DB+0oys/b X62w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=OnzPsjjuCDpF9u6RIt5Ggv/7/2SCPSqP0+VtBSN9frI=; b=v3XEDVqavn6827hJTZD9xJFbgOm1tKHwTCx5dHnE0FFCROUJ93r3uTgOqPe72eQzrU DH4J+92FYDo+/wGPeXCADvAv/RlMy4T/nL+B7JChSpQUK+xP7a2i7IiyolOyNc3AqGEd Br9YS7SNGY1Vfab/tZ3/xeafwXp5eSH4DE8spoWVTQo1Azoe7qGxvs3OLnrNzkmGHAXP NqLzBDOuYKmIc++U8PdyNoBlYeBnyfYU3at6BoB3j23NmpH6GnEx3hmwBjx5EaM6hh97 X74JpPRgXRvO/+3oHo84aY3XudSF3BSoUImlSwBW8KmctUf/Udh3RjEC2Iz7x1A6dUyN Dv0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=DoJV5Xq3; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w10-20020a50d78a000000b004539b045326si13479749edi.417.2022.10.18.23.23.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 23:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=DoJV5Xq3; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A7BB3857B80 for ; Wed, 19 Oct 2022 06:23:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A7BB3857B80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666160581; bh=OnzPsjjuCDpF9u6RIt5Ggv/7/2SCPSqP0+VtBSN9frI=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=DoJV5Xq3pqNHMtCfU4vA9r9MOoBKYEvjkhuQXZocj0/yMAJShO7sXY4izhx/RZ/TX cXHDao534DqvcJo32bVrvP1RhnJjeJzaCIpqmPpzFUiuZZlJguuhU6YrXWKk3cpono QYO1PWqvwOSaVjXwNJ+CzfvNan5nEG2lzArD8aBo= 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 DD9133858D3C for ; Wed, 19 Oct 2022 06:22:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD9133858D3C 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 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 Subject: [PATCH] s390: Fix bootstrap error with checking and -m31 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 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747096001053238712?= X-GMAIL-MSGID: =?utf-8?q?1747096001053238712?= 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))])