https://gcc.gnu.org/g:1e9bde06487dfaa8f0e07890bb6b8f935fbd7d93

commit 1e9bde06487dfaa8f0e07890bb6b8f935fbd7d93
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Thu Jan 23 22:50:07 2025 +0100

    libgomp.c-c++-common/pr109062.c: Fix expected spin count for hybrid x86
    
    On my system with E and P cores (hybrid) x86, the spincount is by default 1
    and not 300000, cf. PR109812 and r14-4571-ge1e127de18dbee.
    
    Hence, this commit updates the expected value of the testcase to also
    accept omp_display_env showing "GOMP_SPINCOUNT = '1'" - but only for
    x86-64, which might be hybrid.
    
    libgomp/ChangeLog:
    
            * testsuite/libgomp.c-c++-common/pr109062.c: Update dg-output
            to also accept GOMP_SPINCOUNT = 1 for x86-64.
    
    (cherry picked from commit 51147890383b89947c673ffd8d7c2cbd675261bd)

Diff:
---
 libgomp/ChangeLog.omp                             | 8 ++++++++
 libgomp/testsuite/libgomp.c-c++-common/pr109062.c | 6 +++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 2f0a501f2d91..04bdec462c29 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,11 @@
+2025-01-23  Tobias Burnus  <tbur...@baylibre.com>
+
+       Backported from master:
+       2024-11-11  Tobias Burnus  <tbur...@baylibre.com>
+
+       * testsuite/libgomp.c-c++-common/pr109062.c: Update dg-output
+       to also accept GOMP_SPINCOUNT = 1 for x86-64.
+
 2025-01-23  Tobias Burnus  <tbur...@baylibre.com>
 
        Backported from master:
diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr109062.c 
b/libgomp/testsuite/libgomp.c-c++-common/pr109062.c
index 5c7c287dafd7..cb05c333e0e9 100644
--- a/libgomp/testsuite/libgomp.c-c++-common/pr109062.c
+++ b/libgomp/testsuite/libgomp.c-c++-common/pr109062.c
@@ -11,4 +11,8 @@ main ()
   return 0;
 }
 
-/* { dg-output ".*\\\[host] GOMP_SPINCOUNT = '300000'.*" { target native } } */
+/* On hybrid x86-64, i.e. with P and E cores, the default is GOMP_SPINCOUNT=1;
+   hence, handle either value; see PR109812. */
+/* { dg-output ".*\\\[host] GOMP_SPINCOUNT = '(?:300000|1)'.*" { target { 
native && { x86_64-*-* i?86-*-* } } } } */
+
+/* { dg-output ".*\\\[host] GOMP_SPINCOUNT = '300000'.*" { target { native && 
{ ! { x86_64-*-* i?86-*-* } } } } } */

Reply via email to