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

Richard Guenther richard.guenther@gmail.com
Fri Jul 9 08:14:00 GMT 2010


On Fri, Jul 9, 2010 at 4:11 AM, Eric Fisher <joefoxreal@gmail.com> wrote:
> Hello,
>
> I put all of the patches I sent to the mailing list these days here
> together. I would be appreciated if anyone could take time to review
> or give suggestions. Here is some description about the changes.
>
> 1. Remove the duplicated item vect_int_mult in gccint doc.
>
> In gccint, 7.2.3.3 Vector-specific attributes, there are two items
> talking about vect_int_mult:
>
> vect_int_mult
>   Target supports a vector widening multiplication of short operands
> into an int result, or supports promotion (unpacking) from short to
> int and a non-widening multiplication of int.
>
> vect_int_mult
>   Target supports vector int multiplication.
>
> The first one must be a mistake.
>
> 2. Fix directives order in a testcase
>
> /* { dg-do compile } */
> /* { dg-require-effective-target vect_float } */
>
> According to the gccint, dg-require-effective-target directive must
> appear after any dg-do directive in the test and before any
> dg-additional-sources directive. This patch moves
> dg-require-effective-target after dg-do in fast-math-vect-reduc-8.c.
>
> 3. Modify vect.exp to go on running the testsuite when the target is mips*.
>
> ...
> } elseif { [istarget "mips*-*-*"]
>           && [check_effective_target_mpaired_single]
>           && [check_effective_target_nomips16] } {
>    lappend DEFAULT_VECTCFLAGS "-mpaired-single"
>    set dg-do-what-default run
> ...
> } else {
>    return
> }
>
> The original logic will fall into the 'else' fragment when the target
> doesn't support paired-single, hence 'return'. The change will make
> the test go on even the target doesn't support paired-single such as
> loongson2f which has SIMD instructions.
>
> 4. Modify target-supports.exp to verify loongson target in vector
> specific attributes.
>
> This patch will modify the target-support.exp to enable vect_int,
> vect_shift, vect_no_int_max, vect_short_mult and vect_no_align for
> loongson target. So that the auto-vectorization tests will be done for
> loongson.
>
> 5. Modify loongson.md to add standard patterns to generate SIMD automatically.
>
> Add define_expand for mulm3 (VH), ashrm3 (VWH), lshrm3 (VWH), so that
> the vector insn can be generated, and the loop vector can do the
> vectorization for these situation, for an example vect-shift-1.c.
>
>
> The patch is tested on loongson2f, and the result is:

How about splitting the patch?

Richard.

>                === gcc Summary ===
>
> # of expected passes            1020
> # of unexpected failures        6
> # of unexpected successes       15
> # of expected failures          91
> # of unsupported tests          142
> /home/xmj/tools/build-trunk/gcc/xgcc  version 4.6.0 20100706
> (experimental) (GCC)
>
>
> Best regards,
> Eric
>



More information about the Gcc-patches mailing list