public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] testsuite: Unbork multilib setups using -march flags (RISC-V)
@ 2023-06-05 16:17 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-06-05 16:17 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:52636b360e7e690f742d92282d91c5454fda6951

commit 52636b360e7e690f742d92282d91c5454fda6951
Author: Vineet Gupta <vineetg@rivosinc.com>
Date:   Tue May 30 21:14:08 2023 -0700

    testsuite: Unbork multilib setups using -march flags (RISC-V)
    
    RISC-V multilib testing is currently busted with follow splat all over:
    
    |    Schedule of variations:
    |        riscv-sim/-march=rv64imafdc/-mabi=lp64d/-mcmodel=medlow
    |        riscv-sim/-march=rv32imafdc/-mabi=ilp32d/-mcmodel=medlow
    |        riscv-sim/-march=rv32imac/-mabi=ilp32/-mcmodel=medlow
    |        riscv-sim/-march=rv64imac/-mabi=lp64/-mcmodel=medlow
    ...
    ...
    | ERROR: tcl error code NONE
    | ERROR: torture-init: torture_without_loops is not empty as expected
    
    causing insane amount of false failures.
    
    |               ========= Summary of gcc testsuite =========
    |                            | # of unexpected case / # of unique unexpected case
    |                            |          gcc |          g++ |     gfortran |
    | rv64imafdc/  lp64d/ medlow | 5421 /     4 |    1 /     1 |    6 /     1 |
    | rv32imafdc/ ilp32d/ medlow | 5422 /     5 |    3 /     2 |    6 /     1 |
    |   rv32imac/  ilp32/ medlow |  391 /     5 |    3 /     2 |   43 /     8 |
    |   rv64imac/   lp64/ medlow | 5422 /     5 |    1 /     1 |   43 /     8 |
    
    The error splat itself is from recent test harness improvements for stricter
    checks for torture-{init,finish} pairing. But the real issue is a latent bug
    from 2009: commit 3dd1415dc88, ("i386-prefetch.exp: Skip tests when multilib
    flags contain -march") which added an "early exit" condition to i386-prefetch.exp
    which could potentially cause an unpaired torture-{init,finish}.
    
    The early exit only happens in a multlib setup using -march in flags
    which is what RISC-V happens to use, hence the reason this was only seen
    on RISC-V multilib testing.
    
    Moving the early exit outside of torture-{init,finish} bracket
    reinstates RISC-V testing.
    
    | rv64imafdc/  lp64d/ medlow |    3 /     2 |    1 /     1 |    6 /     1 |
    | rv32imafdc/ ilp32d/ medlow |    4 /     3 |    3 /     2 |    6 /     1 |
    |   rv32imac/  ilp32/ medlow |    3 /     2 |    3 /     2 |   43 /     8 |
    |   rv64imac/   lp64/ medlow |    5 /     4 |    1 /     1 |   43 /     8 |
    
    gcc/testsuite:
            * gcc.misc-tests/i386-prefetch.exp: Move early return outside
            the torture-{init,finish}
    
    Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>

Diff:
---
 gcc/testsuite/gcc.misc-tests/i386-prefetch.exp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
index ad9e56a54bc..98aab506cba 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
+++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
@@ -14,6 +14,13 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+if { [board_info target exists multilib_flags]
+     && [string match "* -march=*" " [board_info target multilib_flags] "] } {
+    # Multilib flags come after the -march flags we pass and override
+    # them, so skip these tests when such flags are passed.
+    return
+}
+
 # Test that the correct data prefetch instructions (SSE or 3DNow! variant,
 # or none) are used for various i386 cpu-type and instruction set
 # extension options for __builtin_prefetch.  When using -mtune, specify
@@ -90,13 +97,6 @@ load_lib torture-options.exp
 dg-init
 torture-init
 
-if { [board_info target exists multilib_flags]
-     && [string match "* -march=*" " [board_info target multilib_flags] "] } {
-    # Multilib flags come after the -march flags we pass and override
-    # them, so skip these tests when such flags are passed.
-    return
-}
-
 set-torture-options $PREFETCH_NONE
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] "" ""

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

* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] testsuite: Unbork multilib setups using -march flags (RISC-V)
@ 2023-07-14  2:41 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-07-14  2:41 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2d9994eba5c2946cf18a0ab32afd0435b42cd64c

commit 2d9994eba5c2946cf18a0ab32afd0435b42cd64c
Author: Vineet Gupta <vineetg@rivosinc.com>
Date:   Tue May 30 21:14:08 2023 -0700

    testsuite: Unbork multilib setups using -march flags (RISC-V)
    
    RISC-V multilib testing is currently busted with follow splat all over:
    
    |    Schedule of variations:
    |        riscv-sim/-march=rv64imafdc/-mabi=lp64d/-mcmodel=medlow
    |        riscv-sim/-march=rv32imafdc/-mabi=ilp32d/-mcmodel=medlow
    |        riscv-sim/-march=rv32imac/-mabi=ilp32/-mcmodel=medlow
    |        riscv-sim/-march=rv64imac/-mabi=lp64/-mcmodel=medlow
    ...
    ...
    | ERROR: tcl error code NONE
    | ERROR: torture-init: torture_without_loops is not empty as expected
    
    causing insane amount of false failures.
    
    |               ========= Summary of gcc testsuite =========
    |                            | # of unexpected case / # of unique unexpected case
    |                            |          gcc |          g++ |     gfortran |
    | rv64imafdc/  lp64d/ medlow | 5421 /     4 |    1 /     1 |    6 /     1 |
    | rv32imafdc/ ilp32d/ medlow | 5422 /     5 |    3 /     2 |    6 /     1 |
    |   rv32imac/  ilp32/ medlow |  391 /     5 |    3 /     2 |   43 /     8 |
    |   rv64imac/   lp64/ medlow | 5422 /     5 |    1 /     1 |   43 /     8 |
    
    The error splat itself is from recent test harness improvements for stricter
    checks for torture-{init,finish} pairing. But the real issue is a latent bug
    from 2009: commit 3dd1415dc88, ("i386-prefetch.exp: Skip tests when multilib
    flags contain -march") which added an "early exit" condition to i386-prefetch.exp
    which could potentially cause an unpaired torture-{init,finish}.
    
    The early exit only happens in a multlib setup using -march in flags
    which is what RISC-V happens to use, hence the reason this was only seen
    on RISC-V multilib testing.
    
    Moving the early exit outside of torture-{init,finish} bracket
    reinstates RISC-V testing.
    
    | rv64imafdc/  lp64d/ medlow |    3 /     2 |    1 /     1 |    6 /     1 |
    | rv32imafdc/ ilp32d/ medlow |    4 /     3 |    3 /     2 |    6 /     1 |
    |   rv32imac/  ilp32/ medlow |    3 /     2 |    3 /     2 |   43 /     8 |
    |   rv64imac/   lp64/ medlow |    5 /     4 |    1 /     1 |   43 /     8 |
    
    gcc/testsuite:
            * gcc.misc-tests/i386-prefetch.exp: Move early return outside
            the torture-{init,finish}
    
    Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>

Diff:
---
 gcc/testsuite/gcc.misc-tests/i386-prefetch.exp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
index ad9e56a54bc..98aab506cba 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
+++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
@@ -14,6 +14,13 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+if { [board_info target exists multilib_flags]
+     && [string match "* -march=*" " [board_info target multilib_flags] "] } {
+    # Multilib flags come after the -march flags we pass and override
+    # them, so skip these tests when such flags are passed.
+    return
+}
+
 # Test that the correct data prefetch instructions (SSE or 3DNow! variant,
 # or none) are used for various i386 cpu-type and instruction set
 # extension options for __builtin_prefetch.  When using -mtune, specify
@@ -90,13 +97,6 @@ load_lib torture-options.exp
 dg-init
 torture-init
 
-if { [board_info target exists multilib_flags]
-     && [string match "* -march=*" " [board_info target multilib_flags] "] } {
-    # Multilib flags come after the -march flags we pass and override
-    # them, so skip these tests when such flags are passed.
-    return
-}
-
 set-torture-options $PREFETCH_NONE
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] "" ""

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

end of thread, other threads:[~2023-07-14  2:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 16:17 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] testsuite: Unbork multilib setups using -march flags (RISC-V) Jeff Law
2023-07-14  2:41 Jeff Law

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