Hi Sameera,
Sameera Deshpande <[email protected]> writes:
> Changelog:
> gcc/
> * config/mips/mips.md (JOIN_MODE): New mode iterator.
> (join2_load_Store<JOIN_MODE:mode>): New pattern.
> (join2_loadhi): Likewise.
> (define_peehole2): Add peephole2 patterns to join 2
> HI/SI/SF/DF-mode
> load-load and store-stores.
> * config/mips/mips.opt (mload-store-pairs): New option.
> (TARGET_LOAD_STORE_PAIRS): New macro.
> * config/mips/mips.h (ENABLE_LD_ST_PAIRS): Likewise.
> * config/mips/mips-protos.h (mips_load_store_bonding_p): New
> prototype.
> * config/mips/mips.c (mips_load_store_bonding_p): New function.
>
> gcc/testsuite/
> * gcc.target/mips/p5600-bonding.c : New testcase to test
> bonding.
Just 'New file.' is fine for the changelog.
>diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
>b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
>new file mode 100644
>index 0000000..122b9f8
>--- /dev/null
>+++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
>@@ -0,0 +1,19 @@
>+/* { dg-do compile } */
>+/* { dg-options "-dp -mtune=p5600 -mno-micromips -mno-mips16" } */
>+/* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0"
>"-O1" } { "" } } */
>+typedef int VINT32 __attribute__ ((vector_size((16))));
>+
>+void memory_operation_fun2_si(void * __restrict src, void * __restrict dest,
>int num)
Code style applies for testcases too, return type on line above, space
after function name, line length.
>+{
>+ VINT32 *vsrc = (VINT32 *)src;
Indentation.
>+ VINT32 *vdest = (VINT32 *)dest;
>+ int i;
>+
>+ for (i = 0; i < num - 1; i+=2)
>+ {
Indentation
>+ vdest[i] = (vdest[i] + vsrc[i]);
Unnecessary brackets.
>+ vdest[i + 1] = vdest[i + 1] + vsrc[i + 1];
>+ }
>+}
>+/* { dg-final { scan-assembler "join2_" } } */
>+
OK with those changes.
Thanks,
Matthew