This is the mail archive of the 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: [PATCH,vect] ppc cost model options

>David Edelsohn <> wrote on 19/10/2007 14:43:01:
>> Dorit,
>>    I am enabling VMX auto-vectorization for AIX 5.3.  Most testcases
>> succeed.  You can see the failures in the recent testresults.
>>    One set of failures is due to the ppc costmodel using -mcpu=7400.
>> AIX does not run on that processor and does not support that option
>> invoke the AIX assembler properly.
>>    I would like to change the compile-only option to -mcpu=970, which
>> is supported by AIX.  Is there a reason to prefer 7400 instead of
>970 sounds ok to me. I don't know why it's currently set to 7400 - I
>I just copied-and-pasted this code from vect.exp in gcc.dg/vect/. Maybe
>Janis remembers why it was set to 7400.
>(by the way - I wouldn't spend too much time fixing dg-final failures
>the cost-model sub-directory at the moment (e.g. wrong number of loops
>vectorized and such) because the vectorizer cost-model is pending some
>fixes from Harsha
>), to be followed by target-specific tuning of costs.)

Here is the patch implementing the early cost model check. 

The check is added as follows:
- If we do versioning, the threshold comparison is and'ed to the guard
that controls the versioning,
- Otherwise, if we do peeling for alignment, we can determine the
loop-count of the prolog loop according to the threshold test
- Otherwise, the threshold comparison is or'ed with the guard that
controls whether to bypass the vector code and go straight to the scalar

The patch bootstrapped and passed test on amd64-linux.

Ok for trunk?

>> Thanks, David
>>      * gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp: Use
>>    -mcpu=970 instead of 7400.
>> Index: ppc-costmodel-vect.exp
>> ===================================================================
>> --- ppc-costmodel-vect.exp   (revision 129469)
>> +++ ppc-costmodel-vect.exp   (working copy)
>> @@ -49,7 +49,7 @@
>>  } else {
>>      if [is-effective-target ilp32] {
>>          # Specify a cpu that supports VMX for compile-only tests.
>> -        lappend DEFAULT_VECTCFLAGS "-mcpu=7400"
>> +        lappend DEFAULT_VECTCFLAGS "-mcpu=970"
>>      }
>>      set dg-do-what-default compile
>>  }

Attachment: 0008-costmodel-early-scalar.diff
Description: 0008-costmodel-early-scalar.diff

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