This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [vect] Ask for review and approving the patch about vect and loongson


On Tue, Aug 17, 2010 at 8:37 AM, Mingjie Xing <mingjie.xing@gmail.com> wrote:

>> There are various copies of vect.exp scattered in the testsuite:
>>
>> $ find . -name vect.exp
>> ./gcc.dg/vect/vect.exp
>> ./gfortran.dg/vect/vect.exp
>> ./g++.dg/vect/vect.exp
>>
>> You will need to change them all. Bonus points if you merge all these
>> files into globally accessible support library.
>>
>> Uros.
>>
>
> Thanks for point it out. I've extracted the common piece of code into
> a function. See the attachment. Tested on Intel Pentium.
>
> One problem is that there is a little difference among these vect.exp's,
>
> ==========gcc.dg/vect/vect.exp===========
> } elseif [is-effective-target arm_neon_ok] {
> ? ?eval lappend DEFAULT_VECTCFLAGS [add_options_for_arm_neon ""]
> ? ?# NEON does not support denormals, so is not used for vectorization by
> ? ?# default to avoid loss of precision. ?We must pass -ffast-math to test
> ? ?# vectorization of float operations.
> ? ?lappend DEFAULT_VECTCFLAGS "-ffast-math"
> ? ?if [is-effective-target arm_neon_hw] {
> ? ? ?set dg-do-what-default run
> ? ?} else {
> ? ? ?set dg-do-what-default compile
> ? ?}
> } else {
>
> ===========g++.dg/vect/vect.exp, gfortran.dg/vect/vect.exp=========
> } elseif [is-effective-target arm_neon_ok] {
> ? ?eval lappend DEFAULT_VECTCFLAGS [add_options_for_arm_neon ""]
> ? ?if [is-effective-target arm_neon_hw] {
> ? ? ?set dg-do-what-default run
> ? ?} else {
> ? ? ?set dg-do-what-default compile
> ? ?}
> } else {
>
> I'm not sure if this is intentional and how to handle this in that case.

The difference is not intentional, it looks that someone changed only
gcc.dg/vect/vect.exp. So, in case of doubt, simply copy the
functionality from gcc.dg/vect, this should be the master copy for
your function.

+# Check whether the vect tests are supported by the target and set additional
+# target-dependent vector flags, which can be overriden by using dg-options
+# in individual tests. Return 1 if the target supports, 0 otherwise.

... whether the vectorizer tests are supported ... Return 1 if
vectorizer tests are supported by target, 0 otherwise.

Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]