diff mbox

[ARM,Committed] Disable sdiv_1 test on softfloat targets.

Message ID VI1PR0801MB20314B8E9125B3ECB54CF604FFCD0@VI1PR0801MB2031.eurprd08.prod.outlook.com
State New
Headers show

Commit Message

Tamar Christina June 12, 2017, 1:27 p.m. UTC
Committed a less restrictive form in r249125 which now just requires arm_v8_vfp_ok

gcc/testsuite/
2017-06-12  Tamar Christina  <tamar.christina@arm.com>

        * gcc.target/arm/sdiv_costs_1.c: Require arm_v8_vfp_ok.

Thanks,
Tamar

Comments

Christophe Lyon June 13, 2017, 7:57 a.m. UTC | #1
Hi Tamar,

On 12 June 2017 at 15:27, Tamar Christina <Tamar.Christina@arm.com> wrote:
> Committed a less restrictive form in r249125 which now just requires arm_v8_vfp_ok
>
> gcc/testsuite/
> 2017-06-12  Tamar Christina  <tamar.christina@arm.com>
>
>         * gcc.target/arm/sdiv_costs_1.c: Require arm_v8_vfp_ok.
>

I think you forgot to add a dg-add-options directive, to add
-march=armv8-a or similar.

Christophe

> Thanks,
> Tamar
> ________________________________________
> From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org> on behalf of Tamar Christina <Tamar.Christina@arm.com>
> Sent: Monday, June 12, 2017 1:35:08 PM
> To: GCC Patches
> Cc: nd; Kyrylo Tkachov; Richard Earnshaw; Ramana Radhakrishnan
> Subject: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets.
>
> Hi All,
>
> I committed this as r249122 under the GCC obvious rule.
>
> This fixes the failing test gcc.target/arm/sdiv_costs_1.c on soft float targets
> by disabling it on those targets since the div calls aren't expanded.
>
> gcc/testsuite/
> 2017-06-12  Tamar Christina  <tamar.christina@arm.com>
>
>         * gcc.target/arm/sdiv_costs_1.c: Disable on softfloat.
>
> Thanks,
> Tamar
Tamar Christina June 13, 2017, 8:31 a.m. UTC | #2
Hi Christophe,

> > gcc/testsuite/

> > 2017-06-12  Tamar Christina  <tamar.christina@arm.com>

> >

> >         * gcc.target/arm/sdiv_costs_1.c: Require arm_v8_vfp_ok.

> >

> 

> I think you forgot to add a dg-add-options directive, to add -march=armv8-a

> or similar.


Weird, is it still failing? When I tested it was skipping one configuration and executing the rest.

arm_v8_vfp_ok is supposed to add -mfpu=fp-armv8. When I tried it with dg-add-options it didn't
work because it kept adding more options after the -march=armv8-a and reverting it back to armv7.

The only way I found that seemed to work was skipping the test if not supported.

In principle all I really need to know is if the target has a hardware div, but
check_effective_target_arm_divmod_simode did not seem to work.

> 

> Christophe

> 

> > Thanks,

> > Tamar

> > ________________________________________

> > From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org>

> on

> > behalf of Tamar Christina <Tamar.Christina@arm.com>

> > Sent: Monday, June 12, 2017 1:35:08 PM

> > To: GCC Patches

> > Cc: nd; Kyrylo Tkachov; Richard Earnshaw; Ramana Radhakrishnan

> > Subject: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat

> targets.

> >

> > Hi All,

> >

> > I committed this as r249122 under the GCC obvious rule.

> >

> > This fixes the failing test gcc.target/arm/sdiv_costs_1.c on soft

> > float targets by disabling it on those targets since the div calls aren't

> expanded.

> >

> > gcc/testsuite/

> > 2017-06-12  Tamar Christina  <tamar.christina@arm.com>

> >

> >         * gcc.target/arm/sdiv_costs_1.c: Disable on softfloat.

> >

> > Thanks,

> > Tamar
Christophe Lyon June 13, 2017, 8:41 a.m. UTC | #3
On 13 June 2017 at 10:31, Tamar Christina <Tamar.Christina@arm.com> wrote:
> Hi Christophe,
>
>> > gcc/testsuite/
>> > 2017-06-12  Tamar Christina  <tamar.christina@arm.com>
>> >
>> >         * gcc.target/arm/sdiv_costs_1.c: Require arm_v8_vfp_ok.
>> >
>>
>> I think you forgot to add a dg-add-options directive, to add -march=armv8-a
>> or similar.
>
> Weird, is it still failing? When I tested it was skipping one configuration and executing the rest.
>
> arm_v8_vfp_ok is supposed to add -mfpu=fp-armv8. When I tried it with dg-add-options it didn't
> work because it kept adding more options after the -march=armv8-a and reverting it back to armv7.
>
dg-require-effective-target arm_v8_vfp_ok checks if there is a
combination of options to enable
the support for arm v8 vfp. In my log, I can see the arm_v8_vfp_ok
sample code was compiled
with -mfpu=fp-armv8 -mfloat-abi=softfp (on an arm-none-linux-gnueabi toolchain),
but you still need to add dg-add-options, otherwise the testcase is compiled
with -O3 only, (so *without* -mfpu=fp-armv8), and scan-assembler-times fail.


> The only way I found that seemed to work was skipping the test if not supported.
>
> In principle all I really need to know is if the target has a hardware div, but
> check_effective_target_arm_divmod_simode did not seem to work.
>
>>
>> Christophe
>>
>> > Thanks,
>> > Tamar
>> > ________________________________________
>> > From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org>
>> on
>> > behalf of Tamar Christina <Tamar.Christina@arm.com>
>> > Sent: Monday, June 12, 2017 1:35:08 PM
>> > To: GCC Patches
>> > Cc: nd; Kyrylo Tkachov; Richard Earnshaw; Ramana Radhakrishnan
>> > Subject: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat
>> targets.
>> >
>> > Hi All,
>> >
>> > I committed this as r249122 under the GCC obvious rule.
>> >
>> > This fixes the failing test gcc.target/arm/sdiv_costs_1.c on soft
>> > float targets by disabling it on those targets since the div calls aren't
>> expanded.
>> >
>> > gcc/testsuite/
>> > 2017-06-12  Tamar Christina  <tamar.christina@arm.com>
>> >
>> >         * gcc.target/arm/sdiv_costs_1.c: Disable on softfloat.
>> >
>> > Thanks,
>> > Tamar
Tamar Christina June 13, 2017, 10:10 a.m. UTC | #4
> On 13 June 2017 at 10:31, Tamar Christina <Tamar.Christina@arm.com>

> wrote:

> > Hi Christophe,

> >

> >> > gcc/testsuite/

> >> > 2017-06-12  Tamar Christina  <tamar.christina@arm.com>

> >> >

> >> >         * gcc.target/arm/sdiv_costs_1.c: Require arm_v8_vfp_ok.

> >> >

> >>

> >> I think you forgot to add a dg-add-options directive, to add

> >> -march=armv8-a or similar.

> >

> > Weird, is it still failing? When I tested it was skipping one configuration and

> executing the rest.

> >

> > arm_v8_vfp_ok is supposed to add -mfpu=fp-armv8. When I tried it with

> > dg-add-options it didn't work because it kept adding more options after the

> -march=armv8-a and reverting it back to armv7.

> >

> dg-require-effective-target arm_v8_vfp_ok checks if there is a combination

> of options to enable the support for arm v8 vfp. In my log, I can see the

> arm_v8_vfp_ok sample code was compiled with -mfpu=fp-armv8 -mfloat-

> abi=softfp (on an arm-none-linux-gnueabi toolchain), but you still need to

> add dg-add-options, otherwise the testcase is compiled with -O3 only, (so

> *without* -mfpu=fp-armv8), and scan-assembler-times fail.

> 


Thanks, I was under the mistaken impression that requiring an option also
Added the option to the test. Also slightly weird that it did pass locally. But
I've updated the patch and fill post it before committing.

Thanks,
Tamar

> 

> > The only way I found that seemed to work was skipping the test if not

> supported.

> >

> > In principle all I really need to know is if the target has a hardware

> > div, but check_effective_target_arm_divmod_simode did not seem to

> work.

> >

> >>

> >> Christophe

> >>

> >> > Thanks,

> >> > Tamar

> >> > ________________________________________

> >> > From: gcc-patches-owner@gcc.gnu.org <gcc-patches-

> owner@gcc.gnu.org>

> >> on

> >> > behalf of Tamar Christina <Tamar.Christina@arm.com>

> >> > Sent: Monday, June 12, 2017 1:35:08 PM

> >> > To: GCC Patches

> >> > Cc: nd; Kyrylo Tkachov; Richard Earnshaw; Ramana Radhakrishnan

> >> > Subject: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on

> >> > softfloat

> >> targets.

> >> >

> >> > Hi All,

> >> >

> >> > I committed this as r249122 under the GCC obvious rule.

> >> >

> >> > This fixes the failing test gcc.target/arm/sdiv_costs_1.c on soft

> >> > float targets by disabling it on those targets since the div calls

> >> > aren't

> >> expanded.

> >> >

> >> > gcc/testsuite/

> >> > 2017-06-12  Tamar Christina  <tamar.christina@arm.com>

> >> >

> >> >         * gcc.target/arm/sdiv_costs_1.c: Disable on softfloat.

> >> >

> >> > Thanks,

> >> > Tamar
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/arm/sdiv_costs_1.c b/gcc/testsuite/gcc.target/arm/sdiv_costs_1.c
index 76086ab9ce28fceb37a4e8a615a38923fa7b985a..3920590dfcce975aaf7cbe7a4d056df203b7ca2e 100644
--- a/gcc/testsuite/gcc.target/arm/sdiv_costs_1.c
+++ b/gcc/testsuite/gcc.target/arm/sdiv_costs_1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=armv8-a" } */
+/* { dg-options "-O3" } */
+/* { dg-require-effective-target arm_v8_vfp_ok }  */
 
 /* Both sdiv and udiv can be used here, so prefer udiv.  */
 int f1 (unsigned char *p)