public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c
@ 2021-12-17 11:43 Olivier Hainque
  2021-12-17 12:58 ` Segher Boessenkool
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Hainque @ 2021-12-17 11:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: Olivier Hainque, segher

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

Hello,

gcc.target/powerpc/pr97142.c scans the output assembly
for specific instructions which our toolchain configured
to default to -mcpu=604 doesn't produce.

The PR refers to a power9 configuration for the original
report, so the attached patch is a suggestion to add a
-mdejagnu-cpu=power9 to dg-options, which gets the test
to pass for us.

Ok to commit?

Thanks in advance,

Olivier


[-- Attachment #2: 0001-Add-mdejagnu-cpu-power9-to-dg-options-for-pr97142.c.diff --]
[-- Type: application/octet-stream, Size: 976 bytes --]

From b6320101466749c516260afc580b80d9e518d87a Mon Sep 17 00:00:00 2001
From: Olivier Hainque <hainque@adacore.com>
Date: Sat, 9 Oct 2021 13:22:12 +0000
Subject: [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c

To match the tests expectations for toolchains
configured to default to not so capable cpus.

2021-12-17  Olivier Hainque  <hainque@adacore.com>

	* gcc.target/powerpc/pr97142.c: Add -mdejagnu-cpu=power9
	to the dg-options.
---
 gcc/testsuite/gcc.target/powerpc/pr97142.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/pr97142.c b/gcc/testsuite/gcc.target/powerpc/pr97142.c
index 0e5f1c1f61b..f32deef431a 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr97142.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr97142.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast" } */
+/* { dg-options "-Ofast -mdejagnu-cpu=power9" } */
 
 #include <math.h>
 
-- 
2.25.1


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

* Re: [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c
  2021-12-17 11:43 [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c Olivier Hainque
@ 2021-12-17 12:58 ` Segher Boessenkool
  2021-12-17 14:04   ` Olivier Hainque
  0 siblings, 1 reply; 5+ messages in thread
From: Segher Boessenkool @ 2021-12-17 12:58 UTC (permalink / raw)
  To: Olivier Hainque; +Cc: gcc-patches

Hi Olivier,

On Fri, Dec 17, 2021 at 12:43:32PM +0100, Olivier Hainque wrote:
> gcc.target/powerpc/pr97142.c scans the output assembly
> for specific instructions which our toolchain configured
> to default to -mcpu=604 doesn't produce.
> 
> The PR refers to a power9 configuration for the original
> report, so the attached patch is a suggestion to add a
> -mdejagnu-cpu=power9 to dg-options, which gets the test
> to pass for us.

Thanks for the patch!

Please use p7 instead of p9.

Also, you attached some binary, so I cannot reply to it easily.

Thanks,


Segher

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

* Re: [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c
  2021-12-17 12:58 ` Segher Boessenkool
@ 2021-12-17 14:04   ` Olivier Hainque
  2021-12-17 15:17     ` Segher Boessenkool
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Hainque @ 2021-12-17 14:04 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Olivier Hainque, gcc-patches



> On 17 Dec 2021, at 13:58, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> 
> Hi Olivier,
> 
> Thanks for the patch!
> 
> Please use p7 instead of p9.

Sure.

> Also, you attached some binary, so I cannot reply to it easily.

Ah, sorry. I did remember you told me this in the past
and renamed the file .diff to "circumvent" that, which
used to work. I'll check again.

In this instance, it's simple enough to be quoted directly:

--- a/gcc/testsuite/gcc.target/powerpc/pr97142.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr97142.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast" } */
+/* { dg-options "-Ofast -mdejagnu-cpu=power9" } */

I'll change to power7 and commit.

Thanks for your feedback!

Cheers,

Olivier




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

* Re: [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c
  2021-12-17 14:04   ` Olivier Hainque
@ 2021-12-17 15:17     ` Segher Boessenkool
  2021-12-17 18:12       ` Olivier Hainque
  0 siblings, 1 reply; 5+ messages in thread
From: Segher Boessenkool @ 2021-12-17 15:17 UTC (permalink / raw)
  To: Olivier Hainque; +Cc: gcc-patches

On Fri, Dec 17, 2021 at 03:04:19PM +0100, Olivier Hainque wrote:
> > On 17 Dec 2021, at 13:58, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> > Please use p7 instead of p9.
> 
> Sure.
> 
> > Also, you attached some binary, so I cannot reply to it easily.
> 
> Ah, sorry. I did remember you told me this in the past
> and renamed the file .diff to "circumvent" that, which
> used to work. I'll check again.

It was sent as application/octet-stream.  It should just be text/plain
(all the x-* that people use are undefined as well fwiw).

> In this instance, it's simple enough to be quoted directly:

You may want to look into git send-email :-)

> --- a/gcc/testsuite/gcc.target/powerpc/pr97142.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr97142.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-Ofast" } */
> +/* { dg-options "-Ofast -mdejagnu-cpu=power9" } */
> 
> I'll change to power7 and commit.

Okay for trunk like that.  Thanks!


Segher

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

* Re: [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c
  2021-12-17 15:17     ` Segher Boessenkool
@ 2021-12-17 18:12       ` Olivier Hainque
  0 siblings, 0 replies; 5+ messages in thread
From: Olivier Hainque @ 2021-12-17 18:12 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Olivier Hainque, gcc-patches



> On 17 Dec 2021, at 16:17, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> 
>> In this instance, it's simple enough to be quoted directly:
> 
> You may want to look into git send-email :-)

Eh, indeed.

>> --- a/gcc/testsuite/gcc.target/powerpc/pr97142.c
>> +++ b/gcc/testsuite/gcc.target/powerpc/pr97142.c
>> @@ -1,5 +1,5 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-Ofast" } */
>> +/* { dg-options "-Ofast -mdejagnu-cpu=power9" } */
>> 
>> I'll change to power7 and commit.
> 
> Okay for trunk like that.  Thanks!

Sure, done. Thanks for your prompt feedback.

Cheers,

Olivier


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

end of thread, other threads:[~2021-12-17 18:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 11:43 [PATCH] Add -mdejagnu-cpu=power9 to dg-options for pr97142.c Olivier Hainque
2021-12-17 12:58 ` Segher Boessenkool
2021-12-17 14:04   ` Olivier Hainque
2021-12-17 15:17     ` Segher Boessenkool
2021-12-17 18:12       ` Olivier Hainque

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).