Commit 21d818ff by Nathan Froyd Committed by Nathan Froyd

rs6000.c (expand_block_clear): Add TARGET_SPE cases to set eight bytes at a time.

gcc/
	* config/rs6000/rs6000.c (expand_block_clear): Add TARGET_SPE
	cases to set eight bytes at a time.
	(expand_block_move): Likewise.

gcc/testsuite/
	* gcc.target/powerpc/spe-vector-memset.c: New testcase.
	* gcc.target/powerpc/spe-vector-memcpy.c: New testcase.

From-SVN: r127670
parent d6b3c797
2007-08-21 Nathan Froyd <froydnj@codesourcery.com>
* config/rs6000/rs6000.c (expand_block_clear): Add TARGET_SPE
cases to set eight bytes at a time.
(expand_block_move): Likewise.
2007-08-21 Jakub Jelinek <jakub@redhat.com> 2007-08-21 Jakub Jelinek <jakub@redhat.com>
PR debug/32610 PR debug/32610
......
...@@ -9852,6 +9852,8 @@ expand_block_clear (rtx operands[]) ...@@ -9852,6 +9852,8 @@ expand_block_clear (rtx operands[])
clear_step = 16; clear_step = 16;
else if (TARGET_POWERPC64 && align >= 32) else if (TARGET_POWERPC64 && align >= 32)
clear_step = 8; clear_step = 8;
else if (TARGET_SPE && align >= 64)
clear_step = 8;
else else
clear_step = 4; clear_step = 4;
...@@ -9870,6 +9872,11 @@ expand_block_clear (rtx operands[]) ...@@ -9870,6 +9872,11 @@ expand_block_clear (rtx operands[])
clear_bytes = 16; clear_bytes = 16;
mode = V4SImode; mode = V4SImode;
} }
else if (bytes >= 8 && TARGET_SPE && align >= 64)
{
clear_bytes = 8;
mode = V2SImode;
}
else if (bytes >= 8 && TARGET_POWERPC64 else if (bytes >= 8 && TARGET_POWERPC64
/* 64-bit loads and stores require word-aligned /* 64-bit loads and stores require word-aligned
displacements. */ displacements. */
...@@ -9963,6 +9970,12 @@ expand_block_move (rtx operands[]) ...@@ -9963,6 +9970,12 @@ expand_block_move (rtx operands[])
mode = V4SImode; mode = V4SImode;
gen_func.mov = gen_movv4si; gen_func.mov = gen_movv4si;
} }
else if (TARGET_SPE && bytes >= 8 && align >= 64)
{
move_bytes = 8;
mode = V2SImode;
gen_func.mov = gen_movv2si;
}
else if (TARGET_STRING else if (TARGET_STRING
&& bytes > 24 /* move up to 32 bytes at a time */ && bytes > 24 /* move up to 32 bytes at a time */
&& ! fixed_regs[5] && ! fixed_regs[5]
......
2007-08-21 Nathan Froyd <froydnj@codesourcery.com>
* gcc.target/powerpc/spe-vector-memset.c: New testcase.
* gcc.target/powerpc/spe-vector-memcpy.c: New testcase.
2007-08-21 Jakub Jelinek <jakub@redhat.com> 2007-08-21 Jakub Jelinek <jakub@redhat.com>
PR debug/32610 PR debug/32610
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_spe } */
/* { dg-options "-O -mspe=yes" } */
/* { dg-final { scan-assembler "evstdd" } } */
void foo(void)
{
int x[8] __attribute__((aligned(64))) = { 1, 1, 1, 1, 1, 1, 1, 1 };
bar (x);
}
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_spe } */
/* { dg-options "-O -mspe=yes" } */
/* { dg-final { scan-assembler "evstdd" } } */
#include <string.h>
void foo(void)
{
int x[8] __attribute__((aligned(64)));
memset (x, 0, sizeof (x));
bar (x);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment