LoongArch: Fix up memcpy-vec-3.c test case

Message ID 20230909082014.100341-1-xry111@xry111.site
State Unresolved
Headers
Series LoongArch: Fix up memcpy-vec-3.c test case |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Xi Ruoyao Sept. 9, 2023, 8:20 a.m. UTC
  The generic code will split 16-byte copy into two 8-byte copies, so the
vector code wouldn't be used even if -mno-strict-align.  This
contradicted with the purpose of this test case.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/memcpy-vec-3.c: Increase the amount of
	copied bytes to 32.
---
 gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

chenglulu Sept. 9, 2023, 8:21 a.m. UTC | #1
LGTM!

在 2023/9/9 下午4:20, Xi Ruoyao 写道:
> The generic code will split 16-byte copy into two 8-byte copies, so the
> vector code wouldn't be used even if -mno-strict-align.  This
> contradicted with the purpose of this test case.
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.target/loongarch/memcpy-vec-3.c: Increase the amount of
> 	copied bytes to 32.
> ---
>   gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c b/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c
> index 233ed215078..db2ea510b09 100644
> --- a/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c
> +++ b/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c
> @@ -3,4 +3,4 @@
>   /* { dg-final { scan-assembler-not "vst" } } */
>   
>   extern char a[], b[];
> -void test() { __builtin_memcpy(a, b, 16); }
> +void test() { __builtin_memcpy(a, b, 32); }
  
Xi Ruoyao Sept. 9, 2023, 9:59 a.m. UTC | #2
On Sat, 2023-09-09 at 16:21 +0800, chenglulu wrote:
> LGTM!

Pushed r14-3821.

> 在 2023/9/9 下午4:20, Xi Ruoyao 写道:
> > The generic code will split 16-byte copy into two 8-byte copies, so the
> > vector code wouldn't be used even if -mno-strict-align.  This
> > contradicted with the purpose of this test case.
> > 
> > gcc/testsuite/ChangeLog:
> > 
> >         * gcc.target/loongarch/memcpy-vec-3.c: Increase the amount of
> >         copied bytes to 32.
  

Patch

diff --git a/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c b/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c
index 233ed215078..db2ea510b09 100644
--- a/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c
+++ b/gcc/testsuite/gcc.target/loongarch/memcpy-vec-3.c
@@ -3,4 +3,4 @@ 
 /* { dg-final { scan-assembler-not "vst" } } */
 
 extern char a[], b[];
-void test() { __builtin_memcpy(a, b, 16); }
+void test() { __builtin_memcpy(a, b, 32); }