public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] ARM/testsuite: Use non-capturing parentheses with pr53447-5.c
@ 2023-11-22  1:40 Maciej W. Rozycki
  2023-11-22  9:41 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2023-11-22  1:40 UTC (permalink / raw)
  To: gcc-patches
  Cc: Nick Clifton, Richard Earnshaw, Ramana Radhakrishnan,
	Kyrylo Tkachov, Jeff Law

Use non-capturing parentheses for the subexpressions used with 
`scan-assembler-times', to avoid a quirk with double-counting.

	gcc/testsuite/
	* gcc.target/arm/pr53447-5.c: Use non-capturing parentheses with 
	`scan-assembler-times'.
---
Hi,

 The `scan-assembler-times' quirk is being fixed with
<https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637254.html>, but 
we don't need capturing parentheses here, typically used for back 
references, so let's just avoid the quirk altogether and make our matching 
here work either way.  Cf. commit 88c888f11379 ("pr53447-5.c: Fix test 
expectations for neon-fpu.").

 Verified by proof-reading, with a reference to the commit quoted above.  
OK to apply?

  Maciej
---
 gcc/testsuite/gcc.target/arm/pr53447-5.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

gcc-arm-test-pr53447-5-non-capturing.diff
Index: gcc/gcc/testsuite/gcc.target/arm/pr53447-5.c
===================================================================
--- gcc.orig/gcc/testsuite/gcc.target/arm/pr53447-5.c
+++ gcc/gcc/testsuite/gcc.target/arm/pr53447-5.c
@@ -15,8 +15,6 @@ void foo(long long* p)
   p[9] -= p[10];
 }
 
-/* We accept neon instructions vldr.64 and vstr.64 as well.
-   Note: DejaGnu counts patterns with alternatives twice,
-   so actually there are only 10 loads and 9 stores.  */
-/* { dg-final { scan-assembler-times "(ldrd|vldr\\.64)" 20 } } */
-/* { dg-final { scan-assembler-times "(strd|vstr\\.64)" 18 } } */
+/* We accept neon instructions vldr.64 and vstr.64 as well.  */
+/* { dg-final { scan-assembler-times "(?:ldrd|vldr\\.64)" 10 } } */
+/* { dg-final { scan-assembler-times "(?:strd|vstr\\.64)" 9 } } */

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

* Re: [PATCH] ARM/testsuite: Use non-capturing parentheses with pr53447-5.c
  2023-11-22  1:40 [PATCH] ARM/testsuite: Use non-capturing parentheses with pr53447-5.c Maciej W. Rozycki
@ 2023-11-22  9:41 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2023-11-22  9:41 UTC (permalink / raw)
  To: Maciej W. Rozycki, gcc-patches
  Cc: nickc, Richard Earnshaw, Ramana Radhakrishnan, Kyrylo Tkachov, Jeff Law



On 22/11/2023 01:40, Maciej W. Rozycki wrote:
> Use non-capturing parentheses for the subexpressions used with
> `scan-assembler-times', to avoid a quirk with double-counting.
> 
>          gcc/testsuite/
>          * gcc.target/arm/pr53447-5.c: Use non-capturing parentheses with
>          `scan-assembler-times'.
> ---
> Hi,
> 
>   The `scan-assembler-times' quirk is being fixed with
> <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637254.html 
> <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637254.html>>, but
> we don't need capturing parentheses here, typically used for back
> references, so let's just avoid the quirk altogether and make our matching
> here work either way.  Cf. commit 88c888f11379 ("pr53447-5.c: Fix test
> expectations for neon-fpu.").
> 
>   Verified by proof-reading, with a reference to the commit quoted above.
> OK to apply?
> 
>    Maciej
> ---
>   gcc/testsuite/gcc.target/arm/pr53447-5.c |    8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
> 
> gcc-arm-test-pr53447-5-non-capturing.diff
> Index: gcc/gcc/testsuite/gcc.target/arm/pr53447-5.c
> ===================================================================
> --- gcc.orig/gcc/testsuite/gcc.target/arm/pr53447-5.c
> +++ gcc/gcc/testsuite/gcc.target/arm/pr53447-5.c
> @@ -15,8 +15,6 @@ void foo(long long* p)
>     p[9] -= p[10];
>   }
> 
> -/* We accept neon instructions vldr.64 and vstr.64 as well.
> -   Note: DejaGnu counts patterns with alternatives twice,
> -   so actually there are only 10 loads and 9 stores.  */
> -/* { dg-final { scan-assembler-times "(ldrd|vldr\\.64)" 20 } } */
> -/* { dg-final { scan-assembler-times "(strd|vstr\\.64)" 18 } } */
> +/* We accept neon instructions vldr.64 and vstr.64 as well.  */
> +/* { dg-final { scan-assembler-times "(?:ldrd|vldr\\.64)" 10 } } */
> +/* { dg-final { scan-assembler-times "(?:strd|vstr\\.64)" 9 } } */


OK.

Thanks.

R.

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

end of thread, other threads:[~2023-11-22  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22  1:40 [PATCH] ARM/testsuite: Use non-capturing parentheses with pr53447-5.c Maciej W. Rozycki
2023-11-22  9:41 ` Richard Earnshaw

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