diff mbox series

[aarch64] PR112950: gcc.target/aarch64/sve/acle/general/dupq_5.c fails on aarch64_be-linux-gnu

Message ID CAAgBjMk1e+sFsHwScq3zS9hxycAS4vEp_YnhtdsJtLv-EQ5H6Q@mail.gmail.com
State New
Headers show
Series [aarch64] PR112950: gcc.target/aarch64/sve/acle/general/dupq_5.c fails on aarch64_be-linux-gnu | expand

Commit Message

Prathamesh Kulkarni Jan. 27, 2024, 12:57 p.m. UTC
Hi,
The test passes -mlittle-endian option but doesn't have target check
for aarch64_little_endian and thus fails to compile on
aarch64_be-linux-gnu. The patch adds the missing aarch64_little_endian
target check, which makes it unsupported on the target.
OK to commit ?

Thanks,
Prathamesh
PR112950: Add aarch64_little_endian target check for dupq_5.c

gcc/testsuite/ChangeLog:
	PR target/112950
	* gcc.target/aarch64/sve/acle/general/dupq_5.c: Add
	aarch64_little_endian target check.

Comments

Richard Sandiford Jan. 27, 2024, 3:49 p.m. UTC | #1
Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> writes:
> Hi,
> The test passes -mlittle-endian option but doesn't have target check
> for aarch64_little_endian and thus fails to compile on
> aarch64_be-linux-gnu. The patch adds the missing aarch64_little_endian
> target check, which makes it unsupported on the target.
> OK to commit ?
>
> Thanks,
> Prathamesh
>
> PR112950: Add aarch64_little_endian target check for dupq_5.c
>
> gcc/testsuite/ChangeLog:
> 	PR target/112950
> 	* gcc.target/aarch64/sve/acle/general/dupq_5.c: Add
> 	aarch64_little_endian target check.

If we add this requirement, then there's no need to pass -mlittle-endian
in the dg-options.

But dupq_6.c (the corresponding big-endian test) has:

  /* To avoid needing big-endian header files.  */
  #pragma GCC aarch64 "arm_sve.h"

instead of:

  #include <arm_sve.h>

Could you do the same thing here?

Thanks,
Richard

> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> index 6ae8d4c60b2..1990412d0e5 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -mlittle-endian" } */
> +/* { dg-require-effective-target aarch64_little_endian } */
>  
>  #include <arm_sve.h>
>
Prathamesh Kulkarni Jan. 29, 2024, 12:43 p.m. UTC | #2
On Sat, 27 Jan 2024 at 21:19, Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> writes:
> > Hi,
> > The test passes -mlittle-endian option but doesn't have target check
> > for aarch64_little_endian and thus fails to compile on
> > aarch64_be-linux-gnu. The patch adds the missing aarch64_little_endian
> > target check, which makes it unsupported on the target.
> > OK to commit ?
> >
> > Thanks,
> > Prathamesh
> >
> > PR112950: Add aarch64_little_endian target check for dupq_5.c
> >
> > gcc/testsuite/ChangeLog:
> >       PR target/112950
> >       * gcc.target/aarch64/sve/acle/general/dupq_5.c: Add
> >       aarch64_little_endian target check.
>
> If we add this requirement, then there's no need to pass -mlittle-endian
> in the dg-options.
>
> But dupq_6.c (the corresponding big-endian test) has:
>
>   /* To avoid needing big-endian header files.  */
>   #pragma GCC aarch64 "arm_sve.h"
>
> instead of:
>
>   #include <arm_sve.h>
>
> Could you do the same thing here?
That worked, thanks! And it also makes dupq_5.c pass on aarch64_be-linux-gnu.

Thanks,
Prathamesh

>
> Thanks,
> Richard
>
> > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> > index 6ae8d4c60b2..1990412d0e5 100644
> > --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> > +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> > @@ -1,5 +1,6 @@
> >  /* { dg-do compile } */
> >  /* { dg-options "-O2 -mlittle-endian" } */
> > +/* { dg-require-effective-target aarch64_little_endian } */
> >
> >  #include <arm_sve.h>
> >
PR112950: Use #pragma GCC for including arm_sve.h. 

gcc/testsuite/ChangeLog:
	PR target/112950
	* gcc.target/aarch64/sve/acle/general/dupq_5.c: Remove include directive
	and instead use #pragma GCC for including arm_sve.h.

diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
index 6ae8d4c60b2..e88477b6379 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mlittle-endian" } */
 
-#include <arm_sve.h>
+#pragma GCC aarch64 "arm_sve.h"
 
 svint32_t
 dupq (int x1, int x2, int x3, int x4)
Richard Sandiford Jan. 29, 2024, 12:51 p.m. UTC | #3
Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> writes:
> On Sat, 27 Jan 2024 at 21:19, Richard Sandiford
> <richard.sandiford@arm.com> wrote:
>>
>> Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> writes:
>> > Hi,
>> > The test passes -mlittle-endian option but doesn't have target check
>> > for aarch64_little_endian and thus fails to compile on
>> > aarch64_be-linux-gnu. The patch adds the missing aarch64_little_endian
>> > target check, which makes it unsupported on the target.
>> > OK to commit ?
>> >
>> > Thanks,
>> > Prathamesh
>> >
>> > PR112950: Add aarch64_little_endian target check for dupq_5.c
>> >
>> > gcc/testsuite/ChangeLog:
>> >       PR target/112950
>> >       * gcc.target/aarch64/sve/acle/general/dupq_5.c: Add
>> >       aarch64_little_endian target check.
>>
>> If we add this requirement, then there's no need to pass -mlittle-endian
>> in the dg-options.
>>
>> But dupq_6.c (the corresponding big-endian test) has:
>>
>>   /* To avoid needing big-endian header files.  */
>>   #pragma GCC aarch64 "arm_sve.h"
>>
>> instead of:
>>
>>   #include <arm_sve.h>
>>
>> Could you do the same thing here?
> That worked, thanks! And it also makes dupq_5.c pass on aarch64_be-linux-gnu.
>
> Thanks,
> Prathamesh
>
>>
>> Thanks,
>> Richard
>>
>> > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
>> > index 6ae8d4c60b2..1990412d0e5 100644
>> > --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
>> > +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
>> > @@ -1,5 +1,6 @@
>> >  /* { dg-do compile } */
>> >  /* { dg-options "-O2 -mlittle-endian" } */
>> > +/* { dg-require-effective-target aarch64_little_endian } */
>> >
>> >  #include <arm_sve.h>
>> >
>
> PR112950: Use #pragma GCC for including arm_sve.h. 
>
> gcc/testsuite/ChangeLog:
> 	PR target/112950
> 	* gcc.target/aarch64/sve/acle/general/dupq_5.c: Remove include directive
> 	and instead use #pragma GCC for including arm_sve.h.

OK, thanks.

Richard

> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> index 6ae8d4c60b2..e88477b6379 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
> @@ -1,7 +1,7 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -mlittle-endian" } */
>  
> -#include <arm_sve.h>
> +#pragma GCC aarch64 "arm_sve.h"
>  
>  svint32_t
>  dupq (int x1, int x2, int x3, int x4)
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
index 6ae8d4c60b2..1990412d0e5 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_5.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -mlittle-endian" } */
+/* { dg-require-effective-target aarch64_little_endian } */
 
 #include <arm_sve.h>