From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 0B5393858D28 for ; Wed, 17 Nov 2021 16:55:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0B5393858D28 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AHFIRqk010353; Wed, 17 Nov 2021 16:55:04 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cd48yt7r8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Nov 2021 16:55:04 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AHGrYo0012523; Wed, 17 Nov 2021 16:55:04 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cd48yt7qr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Nov 2021 16:55:03 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AHGqmMD026685; Wed, 17 Nov 2021 16:55:03 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma03dal.us.ibm.com with ESMTP id 3ca50cb87m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Nov 2021 16:55:03 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AHGt2d851970508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Nov 2021 16:55:02 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 111F9136060; Wed, 17 Nov 2021 16:55:02 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64465136053; Wed, 17 Nov 2021 16:55:01 +0000 (GMT) Received: from li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com (unknown [9.65.92.51]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTPS; Wed, 17 Nov 2021 16:55:01 +0000 (GMT) Date: Wed, 17 Nov 2021 10:54:59 -0600 From: "Paul A. Clarke" To: wschmidt@linux.ibm.com Cc: GCC Patches , David Edelsohn , Segher Boessenkool Subject: Re: [PATCH] rs6000: Better error messages for power8/9-vector builtins Message-ID: <20211117165459.GA7755@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> References: <00061cd6-52e1-457d-5a7b-b5feac1c20f5@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00061cd6-52e1-457d-5a7b-b5feac1c20f5@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: cvcKrGA0wXGhsbSQVAlyvP2kvhNF8Kpn X-Proofpoint-ORIG-GUID: b5-DuUFV0gdmubCtJGEUz1rMO8-KFU3L X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-17_05,2021-11-17_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111170077 X-Spam-Status: No, score=-12.1 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_NONE, 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-List-Received-Date: Wed, 17 Nov 2021 16:55:07 -0000 On Tue, Nov 16, 2021 at 11:12:35AM -0600, Bill Schmidt via Gcc-patches wrote: > Hi! During a previous patch review, Segher asked that I provide better > messages when builtins are unavailable because they require both a minimum > CPU and the enablement of VSX instructions. This patch does just that. ... > gcc/ > * config/rs6000/rs6000-call.c (rs6000_invalid_new_builtin): Change > error messages for ENB_P8V and ENB_P9V. > --- > gcc/config/rs6000/rs6000-call.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c > index 85fec80c6d7..035266eb001 100644 > --- a/gcc/config/rs6000/rs6000-call.c > +++ b/gcc/config/rs6000/rs6000-call.c > @@ -11943,7 +11943,8 @@ rs6000_invalid_new_builtin (enum rs6000_gen_builtins fncode) > error ("%qs requires the %qs option", name, "-mcpu=power8"); > break; > case ENB_P8V: > - error ("%qs requires the %qs option", name, "-mpower8-vector"); > + error ("%qs requires the %qs and %qs options", name, "-mcpu=power8", > + "-mvsx"); "-mcpu=power8" itself enables "-mvsx", doesn't it? > break; > case ENB_P9: > error ("%qs requires the %qs option", name, "-mcpu=power9"); > @@ -11953,7 +11954,8 @@ rs6000_invalid_new_builtin (enum rs6000_gen_builtins fncode) > name, "-mcpu=power9", "-m64", "-mpowerpc64"); > break; > case ENB_P9V: > - error ("%qs requires the %qs option", name, "-mpower9-vector"); > + error ("%qs requires the %qs and %qs options", name, "-mcpu=power9", > + "-mvsx"); Similarly, "-mcpu=power9" itself enables "-mvsx", doesn't it? Are you trying to also say "don't use -mno-vsx"? If so, maybe s/and/with/ would be slightly less confusing? This is going to be awkward unless it can be more precise, like two messages depending on actual context: - with "-mcpu=power8 -mno-vsx: "...requires -mvsx". - without "-mcpu=power8": "...requires -mcpu=power8". PC