[PATCH] testsuite: Update some vect cases for partial vectors
Richard Sandiford
richard.sandiford@arm.com
Thu Aug 6 08:46:32 GMT 2020
"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
More information about the Gcc-patches
mailing list