From: Bill Schmidt <wschmidt@linux.ibm.com>
To: "Paul A. Clarke" <pc@us.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>,
Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [PATCH] rs6000: Better error messages for power8/9-vector builtins
Date: Wed, 17 Nov 2021 11:00:07 -0600 [thread overview]
Message-ID: <1540c206-56b4-3f65-3477-43a7ecaec0c8@linux.ibm.com> (raw)
In-Reply-To: <20211117165459.GA7755@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com>
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
next prev parent reply other threads:[~2021-11-17 17:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 17:12 Bill Schmidt
2021-11-17 16:54 ` Paul A. Clarke
2021-11-17 17:00 ` Bill Schmidt [this message]
2021-11-17 17:45 ` Paul A. Clarke
2021-11-17 20:00 ` Segher Boessenkool
2021-11-17 20:04 ` David Edelsohn
2021-11-17 20:25 ` Paul A. Clarke
2021-11-17 20:29 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1540c206-56b4-3f65-3477-43a7ecaec0c8@linux.ibm.com \
--to=wschmidt@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pc@us.ibm.com \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).