From patchwork Sat Oct 30 10:43:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schulze Frielinghaus X-Patchwork-Id: 46817 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 843F83858436 for ; Sat, 30 Oct 2021 11:04:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 843F83858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635591866; bh=IgUUQOzoeXE7QZIpS0+2Hz2Evr0J9Chc+zOKVuYULFU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=O+V1z7sRWxytgXmY1YPeJnKrwbYaUsywAUtxJmTvlnpFqmwClfTCTD0XUjNgZpp+S o4KAk7eGtp4uWk+hpOejSEIJYqeY6VxQMI29dufjLPGeaSzYZTxsjFZdLIqXpbDrrw cp60VAOuloIiS03SIiUgVSwj5SbE5Y4FjQeWOPnk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id D51CE3858C2C for ; Sat, 30 Oct 2021 11:03:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D51CE3858C2C Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19U8kNHH013376 for ; Sat, 30 Oct 2021 11:03:57 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 3c12u4sg0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 30 Oct 2021 11:03:57 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19UB2o87013648 for ; Sat, 30 Oct 2021 11:03:55 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03fra.de.ibm.com with ESMTP id 3c0wp91b2j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 30 Oct 2021 11:03:55 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19UB3qsr5571236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 30 Oct 2021 11:03:52 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 27AB042448; Sat, 30 Oct 2021 10:44:16 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F2E8F42444; Sat, 30 Oct 2021 10:44:15 +0000 (GMT) Received: from t8345026.lnxne.boe (unknown [9.152.108.100]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sat, 30 Oct 2021 10:44:15 +0000 (GMT) To: gcc-patches@gcc.gnu.org, krebbel@linux.ibm.com Subject: [PATCH] IBM Z: Fix address of operands will never be NULL warnings Date: Sat, 30 Oct 2021 12:43:14 +0200 Message-Id: <20211030104313.228409-1-stefansf@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KUljOHd80yzrYZVdRgpt90p9FUyL2OMW X-Proofpoint-ORIG-GUID: KUljOHd80yzrYZVdRgpt90p9FUyL2OMW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-30_02,2021-10-29_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 clxscore=1015 phishscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110300063 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, 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: Stefan Schulze Frielinghaus via Gcc-patches From: Stefan Schulze Frielinghaus Reply-To: Stefan Schulze Frielinghaus Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Since a recent enhancement of -Waddress a couple of warnings are emitted and turned into errors during bootstrap: gcc/config/s390/s390.md:12087:25: error: the address of 'operands' will never be NULL [-Werror=address] 12087 | "TARGET_HTM && operands != NULL build/gencondmd.c:59:12: note: 'operands' declared here 59 | extern rtx operands[]; | ^~~~~~~~ Fixed by removing those non-null checks. Bootstrapped and regtested on IBM Z. Ok for mainline? gcc/ChangeLog: * config/s390/s390.md ("*cc_to_int", "tabort", "*tabort_1", "*tabort_1_plus"): Remove operands non-null check. --- gcc/config/s390/s390.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index b8bdbaec468..4debdcd1247 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -3533,7 +3533,7 @@ [(set (match_operand:SI 0 "nonimmediate_operand" "=d") (unspec:SI [(match_operand 1 "register_operand" "0")] UNSPEC_CC_TO_INT))] - "operands != NULL" + "" "#" "reload_completed" [(set (match_dup 0) (lshiftrt:SI (match_dup 0) (const_int 28)))]) @@ -12062,7 +12062,7 @@ (define_expand "tabort" [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "")] UNSPECV_TABORT)] - "TARGET_HTM && operands != NULL" + "TARGET_HTM" { if (CONST_INT_P (operands[0]) && INTVAL (operands[0]) >= 0 && INTVAL (operands[0]) <= 255) @@ -12076,7 +12076,7 @@ (define_insn "*tabort_1" [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "aJ")] UNSPECV_TABORT)] - "TARGET_HTM && operands != NULL" + "TARGET_HTM" "tabort\t%Y0" [(set_attr "op_type" "S")]) @@ -12084,8 +12084,7 @@ [(unspec_volatile [(plus:SI (match_operand:SI 0 "register_operand" "a") (match_operand:SI 1 "const_int_operand" "J"))] UNSPECV_TABORT)] - "TARGET_HTM && operands != NULL - && CONST_OK_FOR_CONSTRAINT_P (INTVAL (operands[1]), 'J', \"J\")" + "TARGET_HTM && CONST_OK_FOR_CONSTRAINT_P (INTVAL (operands[1]), 'J', \"J\")" "tabort\t%1(%0)" [(set_attr "op_type" "S")])