From: Richard Sandiford <richard.sandiford@arm.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Segher Boessenkool <segher@kernel.crashing.org>,
Bill Schmidt <wschmidt@linux.ibm.com>,
Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH] testsuite: Update some vect cases for partial vectors
Date: Thu, 06 Aug 2020 09:46:32 +0100 [thread overview]
Message-ID: <mptlfisyxef.fsf@arm.com> (raw)
In-Reply-To: <49cdca10-99c3-5cc0-f7f8-f785a97ffe3f@linux.ibm.com> (Kewen Lin's message of "Thu, 6 Aug 2020 15:37:18 +0800")
"Kewen.Lin" <linkw@linux.ibm.com> writes:
>>> +# Return true if loops using partial vectors are supported.
>>> +
>>> +proc check_effective_target_vect_partial_vectors { } {
>>> + return [expr { [check_effective_target_vect_partial_vectors_usage_1]
>>> + || [check_effective_target_vect_partial_vectors_usage_2] }]
>>> +}
>>> +
>>> +# Return true if loops using partial vectors are supported and the default
>>> +# value of --param=vect-partial-vector-usage is 1.
>>> +
>>> +proc check_effective_target_vect_partial_vectors_usage_1 { } {
>>> + return 0
>>> +}
>>> +
>>> +# Return true if loops using partial vectors are supported and the default
>>> +# value of --param=vect-partial-vector-usage is 2.
>>> +
>>> +proc check_effective_target_vect_partial_vectors_usage_2 { } {
>>> + return [expr { [check_effective_target_vect_fully_masked] }]
>>> +}
>>> +
>>
>> Could we auto-detect this? What we really care about isn't the default,
>> but what's currently being tested.
>
> Yeah, the comments were confusing, its intent is to check which targets
> support partial vectors and which usage to be used.
>
> How about to update them like:
>
> "Return true if loops using partial vectors are supported and usage kind is
> 1/2".
I wasn't really commenting on the comment so much as the intent.
It should be possible to run the testsuite with:
--target_board unix/--param=vect-partial-vector-usage=1
and get the right results.
>> E.g. maybe use check_compile to run gcc with “-Q --help=params” and an
>> arbitrary output type (probably assembly). Then use “regexp” on the
>> lines to parse the --param=vect-partial-vector-usage value. At that
>> point it would be worth caching the result.
>
> Now the default value of this parameter is 2, even for those targets which
> don't have the supports with partial vectors. Since we will get the value
> 2 on those unsupported targets, it looks like we have to set it manually?
I think that just means we want:
vect_len_load_store
the len_load_store equivalent of vect_fully_masked, i.e. whether
the target supports len load/store (regardless of whether the
--param enables it)
vect_partial_vectors
(vect_fully_masked || vect_len_load_store) && param != 0
vect_partial_vectors_usage_1
(vect_fully_masked || vect_len_load_store) && param == 1
vect_partial_vectors_usage_2
(vect_fully_masked || vect_len_load_store) && param == 2
Thanks,
Richard
next prev parent reply other threads:[~2020-08-06 8:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 9:22 Kewen.Lin
2020-08-06 5:52 ` Richard Sandiford
2020-08-06 7:37 ` Kewen.Lin
2020-08-06 8:46 ` Richard Sandiford [this message]
2020-08-19 6:15 ` [PATCH v2] " Kewen.Lin
2020-08-27 16:55 ` Richard Sandiford
2020-08-31 3:50 ` Kewen.Lin
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=mptlfisyxef.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=richard.guenther@gmail.com \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.ibm.com \
/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).