public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] s390/testsuite: Fix oscbreak-1.c.
@ 2021-04-16 13:59 Robin Dapp
  2021-04-20  7:05 ` Andreas Krebbel
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Dapp @ 2021-04-16 13:59 UTC (permalink / raw)
  To: gcc-patches, krebbel

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

Hi,

checking for an osc break is somewhat brittle especially with many
passes potentially introducing new insns and moving them around.
Therefore, only run the test with -O1 -fschedule-insns in order to limit
the influence of other passes.

Is it OK?

Regards
  Robin

--

gcc/testsuite/ChangeLog:

        * gcc.target/s390/oscbreak-1.c: Compile with -O1
          -fschedule-insns.

[-- Attachment #2: gcc-oscbreak.diff --]
[-- Type: text/x-patch, Size: 725 bytes --]

diff --git a/gcc/testsuite/gcc.target/s390/oscbreak-1.c b/gcc/testsuite/gcc.target/s390/oscbreak-1.c
index fdf356c1fd0..0c612531132 100644
--- a/gcc/testsuite/gcc.target/s390/oscbreak-1.c
+++ b/gcc/testsuite/gcc.target/s390/oscbreak-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -mtune=z13 -dp" } */
+/* { dg-options "-O1 -mtune=z13 -fschedule-insns -dp" } */
 
 void
 foo (char *a, int b)
@@ -10,6 +10,7 @@ foo (char *a, int b)
     a[i] += 1;
 }
 
+/* We should not unconditionally emit an osc_break here.  */
 void
 bar (char *a, int b)
 {
@@ -22,4 +23,4 @@ bar (char *a, int b)
     }
 }
 
-/* { dg-final { scan-assembler "osc_break" } } */
+/* { dg-final { scan-assembler-times "osc_break" 1 } } */

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

* Re: [PATCH] s390/testsuite: Fix oscbreak-1.c.
  2021-04-16 13:59 [PATCH] s390/testsuite: Fix oscbreak-1.c Robin Dapp
@ 2021-04-20  7:05 ` Andreas Krebbel
  2021-05-04 14:13   ` Robin Dapp
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Krebbel @ 2021-04-20  7:05 UTC (permalink / raw)
  To: Robin Dapp, gcc-patches

On 4/16/21 3:59 PM, Robin Dapp wrote:
> Hi,
> 
> checking for an osc break is somewhat brittle especially with many
> passes potentially introducing new insns and moving them around.
> Therefore, only run the test with -O1 -fschedule-insns in order to limit
> the influence of other passes.

Yeah, that's because of the very limited analysis we do in the backend to detect such cases. In fact
we probably would want to have an OSC break in many of them as well.

For me the testcase appears to work with -O2 on all the -march levels. I think -O2 would be
preferred because that's what is most frequently used.

> 
> Is it OK?

Yes, either with -O2 or the options you have proposed if -O2 doesn't work out for you.

Thanks!

Andreas

> 
> Regards
>   Robin
> 
> --
> 
> gcc/testsuite/ChangeLog:
> 
>         * gcc.target/s390/oscbreak-1.c: Compile with -O1
>           -fschedule-insns.
> 


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

* Re: [PATCH] s390/testsuite: Fix oscbreak-1.c.
  2021-04-20  7:05 ` Andreas Krebbel
@ 2021-05-04 14:13   ` Robin Dapp
  0 siblings, 0 replies; 3+ messages in thread
From: Robin Dapp @ 2021-05-04 14:13 UTC (permalink / raw)
  To: Andreas Krebbel, gcc-patches

Hi,

> Yeah, that's because of the very limited analysis we do in the backend to detect such cases. In fact
> we probably would want to have an OSC break in many of them as well.
> 
> For me the testcase appears to work with -O2 on all the -march levels. I think -O2 would be
> preferred because that's what is most frequently used.
> 
>>
>> Is it OK?
> 
> Yes, either with -O2 or the options you have proposed if -O2 doesn't work out for you.

-O2 did not work reliably for me with different --with_arch settings. 
I'm going to commit the -O1 -fschedule-insns version then.

Regards
  Robin

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

end of thread, other threads:[~2021-05-04 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 13:59 [PATCH] s390/testsuite: Fix oscbreak-1.c Robin Dapp
2021-04-20  7:05 ` Andreas Krebbel
2021-05-04 14:13   ` Robin Dapp

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