public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets.
@ 2017-06-12 12:35 Tamar Christina
  2017-06-12 13:27 ` Tamar Christina
  0 siblings, 1 reply; 6+ messages in thread
From: Tamar Christina @ 2017-06-12 12:35 UTC (permalink / raw)
  To: GCC Patches; +Cc: nd, Kyrylo Tkachov, Richard Earnshaw, Ramana Radhakrishnan

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sdiv-arm-fix.patch --]
[-- Type: text/x-patch; name="sdiv-arm-fix.patch", Size: 529 bytes --]

diff --git a/gcc/testsuite/gcc.target/arm/sdiv_costs_1.c b/gcc/testsuite/gcc.target/arm/sdiv_costs_1.c
index 76086ab9ce28fceb37a4e8a615a38923fa7b985a..2ef397e22ca1643685ec7af31f76201746df5015 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-require-effective-target arm_hard_vfp_ok }  */
 
 /* Both sdiv and udiv can be used here, so prefer udiv.  */
 int f1 (unsigned char *p)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets.
  2017-06-12 12:35 [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets Tamar Christina
@ 2017-06-12 13:27 ` Tamar Christina
  2017-06-13  7:57   ` Christophe Lyon
  0 siblings, 1 reply; 6+ messages in thread
From: Tamar Christina @ 2017-06-12 13:27 UTC (permalink / raw)
  To: GCC Patches; +Cc: nd, Kyrylo Tkachov, Richard Earnshaw, Ramana Radhakrishnan

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

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
________________________________________
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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sdiv-arm-fix-2.patch --]
[-- Type: text/x-patch; name="sdiv-arm-fix-2.patch", Size: 555 bytes --]

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets.
  2017-06-12 13:27 ` Tamar Christina
@ 2017-06-13  7:57   ` Christophe Lyon
  2017-06-13  8:31     ` Tamar Christina
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe Lyon @ 2017-06-13  7:57 UTC (permalink / raw)
  To: Tamar Christina
  Cc: GCC Patches, nd, Kyrylo Tkachov, Richard Earnshaw, Ramana Radhakrishnan

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets.
  2017-06-13  7:57   ` Christophe Lyon
@ 2017-06-13  8:31     ` Tamar Christina
  2017-06-13  8:41       ` Christophe Lyon
  0 siblings, 1 reply; 6+ messages in thread
From: Tamar Christina @ 2017-06-13  8:31 UTC (permalink / raw)
  To: Christophe Lyon
  Cc: GCC Patches, nd, Kyrylo Tkachov, Richard Earnshaw, Ramana Radhakrishnan

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets.
  2017-06-13  8:31     ` Tamar Christina
@ 2017-06-13  8:41       ` Christophe Lyon
  2017-06-13 10:10         ` Tamar Christina
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe Lyon @ 2017-06-13  8:41 UTC (permalink / raw)
  To: Tamar Christina
  Cc: GCC Patches, nd, Kyrylo Tkachov, Richard Earnshaw, Ramana Radhakrishnan

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets.
  2017-06-13  8:41       ` Christophe Lyon
@ 2017-06-13 10:10         ` Tamar Christina
  0 siblings, 0 replies; 6+ messages in thread
From: Tamar Christina @ 2017-06-13 10:10 UTC (permalink / raw)
  To: Christophe Lyon
  Cc: GCC Patches, nd, Kyrylo Tkachov, Richard Earnshaw, Ramana Radhakrishnan

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-13 10:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 12:35 [GCC][PATCH][ARM][Committed] Disable sdiv_1 test on softfloat targets Tamar Christina
2017-06-12 13:27 ` Tamar Christina
2017-06-13  7:57   ` Christophe Lyon
2017-06-13  8:31     ` Tamar Christina
2017-06-13  8:41       ` Christophe Lyon
2017-06-13 10:10         ` Tamar Christina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).