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 7B0333858D28 for ; Wed, 17 Nov 2021 17:00:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7B0333858D28 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 1AHFIRnv010348; Wed, 17 Nov 2021 17:00:11 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3cd48ytav7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Nov 2021 17:00:11 +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 1AHGbMxP009826; Wed, 17 Nov 2021 17:00:10 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 3cd48ytauv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Nov 2021 17:00:10 +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 1AHGwncX009178; Wed, 17 Nov 2021 17:00:10 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03dal.us.ibm.com with ESMTP id 3ca50cbbw5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Nov 2021 17:00:10 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AHH08JZ56951292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Nov 2021 17:00:08 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0667C6091; Wed, 17 Nov 2021 17:00:08 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D016C6059; Wed, 17 Nov 2021 17:00:08 +0000 (GMT) Received: from [9.211.84.243] (unknown [9.211.84.243]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 17 Nov 2021 17:00:08 +0000 (GMT) Message-ID: <1540c206-56b4-3f65-3477-43a7ecaec0c8@linux.ibm.com> Date: Wed, 17 Nov 2021 11:00:07 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Reply-To: wschmidt@linux.ibm.com Subject: Re: [PATCH] rs6000: Better error messages for power8/9-vector builtins To: "Paul A. Clarke" Cc: GCC Patches , David Edelsohn , Segher Boessenkool References: <00061cd6-52e1-457d-5a7b-b5feac1c20f5@linux.ibm.com> <20211117165459.GA7755@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> From: Bill Schmidt In-Reply-To: <20211117165459.GA7755@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: oInMGmqRImuJAo1DHeTvFoKyszWnVjLS X-Proofpoint-ORIG-GUID: c55qLmFufSEAHvDl7B-i3XE6v326Tf9y 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.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, 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-List-Received-Date: Wed, 17 Nov 2021 17:00:14 -0000 On 11/17/21 10:54 AM, Paul A. Clarke wrote: > 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? Of course, but it can be disabled with -mno-vsx. Then you get this error. You won't get it unless you deliberately did something strange with the compile options. > >> 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". This seems like a YMMV situation...I don't see the confusion myself. Bill > > PC