testsuite: Fix CRC testcases
Checks
Context |
Check |
Description |
rivoscibot/toolchain-ci-rivos-lint |
success
|
Lint passed
|
rivoscibot/toolchain-ci-rivos-apply-patch |
success
|
Patch applied
|
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gc-lp64d-non-multilib |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc-lp64d-non-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gcv-lp64d-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc_zba_zbb_zbc_zbs-lp64d-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv64gcv-lp64d-multilib |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Test passed
|
rivoscibot/toolchain-ci-rivos-test |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Hi all,
The latest CRC optimization patches include some testcases that do not
work well. Some testcases in gcc/testsuite/gcc.dg lead to UNRESOLVED
results when testing without an explicit -O<n> flag. Other testcases in
gcc/testsuite/gcc.target/riscv do not work when testing with RV32
-march/-mabi options on riscv64* compilers, and in the opposite case.
This patch tries to deal with the aforementioned issues.
Thanks,
Bohan
---
gcc/testsuite/gcc.dg/crc-linux-1.c | 2 +-
gcc/testsuite/gcc.dg/crc-linux-2.c | 2 +-
gcc/testsuite/gcc.dg/crc-linux-4.c | 2 +-
gcc/testsuite/gcc.dg/crc-linux-5.c | 2 +-
gcc/testsuite/gcc.dg/crc-not-crc-15.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-1.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-10.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-11.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-12.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-13.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-14.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-15.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-16.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-17.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-2.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-3.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-4.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-5.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-6.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-7.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-8.c | 2 +-
gcc/testsuite/gcc.dg/crc-side-instr-9.c | 2 +-
gcc/testsuite/gcc.target/riscv/crc-builtin-zbc32.c | 4 ++--
gcc/testsuite/gcc.target/riscv/crc-builtin-zbc64.c | 4 ++--
24 files changed, 26 insertions(+), 26 deletions(-)
Comments
On Tue, 2024-12-03 at 15:23 +0800, Bohan Lei wrote:
>
> diff --git a/gcc/testsuite/gcc.dg/crc-linux-1.c
> b/gcc/testsuite/gcc.dg/crc-linux-1.c
> index 918b423a583..3261ba48b8b 100644
> --- a/gcc/testsuite/gcc.dg/crc-linux-1.c
> +++ b/gcc/testsuite/gcc.dg/crc-linux-1.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile } */
> -/* { dg-options "-fdump-tree-crc-details -w" } */
> +/* { dg-options "-O2 -fdump-tree-crc-details -w" } */
> /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-O3" "-flto" } } */
No, the current consensus is moving them from gcc.dg to gcc.dg/torture.
to fix the issue. See
https://gcc.gnu.org/pipermail/gcc-patches/2024-December/670619.html.
Thank you for pointing it out. I guess the RV32 issue may still exist.
Bohan
------------------------------------------------------------------
From:Xi Ruoyao <xry111@xry111.site>
Send Time:2024 Dec. 3 (Tue.) 15:56
To:Bohan Lei<garthlei@linux.alibaba.com>; "gcc-patches"<gcc-patches@gcc.gnu.org>
Cc:jeffreyalaw<jeffreyalaw@gmail.com>; mariamarutunian<mariamarutunian@gmail.com>
Subject:Re: [PATCH] testsuite: Fix CRC testcases
On Tue, 2024-12-03 at 15:23 +0800, Bohan Lei wrote:
>
> diff --git a/gcc/testsuite/gcc.dg/crc-linux-1.c
> b/gcc/testsuite/gcc.dg/crc-linux-1.c
> index 918b423a583..3261ba48b8b 100644
> --- a/gcc/testsuite/gcc.dg/crc-linux-1.c
> +++ b/gcc/testsuite/gcc.dg/crc-linux-1.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile } */
> -/* { dg-options "-fdump-tree-crc-details -w" } */
> +/* { dg-options "-O2 -fdump-tree-crc-details -w" } */
> /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-O3" "-flto" } } */
No, the current consensus is moving them from gcc.dg to gcc.dg/torture.
to fix the issue. See
https://gcc.gnu.org/pipermail/gcc-patches/2024-December/670619.html.
On Tue, 2024-12-03 at 17:14 +0800, Bohan Lei wrote:
> Thank you for pointing it out. I guess the RV32 issue may still exist.
Please send v2 with only the RISC-V fixes if you can still reproduce the
issue.
>
> Bohan
>
> ------------------------------------------------------------------
> From:Xi Ruoyao <xry111@xry111.site>
> Send Time:2024 Dec. 3 (Tue.) 15:56
> To:Bohan Lei<garthlei@linux.alibaba.com>; "gcc-
> patches"<gcc-patches@gcc.gnu.org>
> Cc:jeffreyalaw<jeffreyalaw@gmail.com>;
> mariamarutunian<mariamarutunian@gmail.com>
> Subject:Re: [PATCH] testsuite: Fix CRC testcases
>
>
> On Tue, 2024-12-03 at 15:23 +0800, Bohan Lei wrote:
> >
> > diff --git a/gcc/testsuite/gcc.dg/crc-linux-1.c
> > b/gcc/testsuite/gcc.dg/crc-linux-1.c
> > index 918b423a583..3261ba48b8b 100644
> > --- a/gcc/testsuite/gcc.dg/crc-linux-1.c
> > +++ b/gcc/testsuite/gcc.dg/crc-linux-1.c
> > @@ -1,5 +1,5 @@
> > /* { dg-do compile } */
> > -/* { dg-options "-fdump-tree-crc-details -w" } */
> > +/* { dg-options "-O2 -fdump-tree-crc-details -w" } */
> > /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-O3" "-flto" } }
> > */
>
> No, the current consensus is moving them from gcc.dg to
> gcc.dg/torture.
> to fix the issue. See
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/670619.html.
>
The RISC-V part has been fixed by another committed patch in
https://gcc.gnu.org/pipermail/gcc-patches/2024-December/670722.html.
------------------------------------------------------------------
From:Xi Ruoyao <xry111@xry111.site>
Send Time:2024 Dec. 4 (Wed.) 15:12
To:Bohan Lei<garthlei@linux.alibaba.com>
Cc:"gcc-patches"<gcc-patches@gcc.gnu.org>
Subject:Re: [PATCH] testsuite: Fix CRC testcases
On Tue, 2024-12-03 at 17:14 +0800, Bohan Lei wrote:
> Thank you for pointing it out. I guess the RV32 issue may still exist.
Please send v2 with only the RISC-V fixes if you can still reproduce the
issue.
>
> Bohan
>
> ------------------------------------------------------------------
> From:Xi Ruoyao <xry111@xry111.site>
> Send Time:2024 Dec. 3 (Tue.) 15:56
> To:Bohan Lei<garthlei@linux.alibaba.com>; "gcc-
> patches"<gcc-patches@gcc.gnu.org>
> Cc:jeffreyalaw<jeffreyalaw@gmail.com>;
> mariamarutunian<mariamarutunian@gmail.com>
> Subject:Re: [PATCH] testsuite: Fix CRC testcases
>
>
> On Tue, 2024-12-03 at 15:23 +0800, Bohan Lei wrote:
> >
> > diff --git a/gcc/testsuite/gcc.dg/crc-linux-1.c
> > b/gcc/testsuite/gcc.dg/crc-linux-1.c
> > index 918b423a583..3261ba48b8b 100644
> > --- a/gcc/testsuite/gcc.dg/crc-linux-1.c
> > +++ b/gcc/testsuite/gcc.dg/crc-linux-1.c
> > @@ -1,5 +1,5 @@
> > /* { dg-do compile } */
> > -/* { dg-options "-fdump-tree-crc-details -w" } */
> > +/* { dg-options "-O2 -fdump-tree-crc-details -w" } */
> > /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-O3" "-flto" } }
> > */
>
> No, the current consensus is moving them from gcc.dg to
> gcc.dg/torture.
> to fix the issue. See
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/670619.html.
>
On 12/3/24 12:56 AM, Xi Ruoyao wrote:
> On Tue, 2024-12-03 at 15:23 +0800, Bohan Lei wrote:
>>
>> diff --git a/gcc/testsuite/gcc.dg/crc-linux-1.c
>> b/gcc/testsuite/gcc.dg/crc-linux-1.c
>> index 918b423a583..3261ba48b8b 100644
>> --- a/gcc/testsuite/gcc.dg/crc-linux-1.c
>> +++ b/gcc/testsuite/gcc.dg/crc-linux-1.c
>> @@ -1,5 +1,5 @@
>> /* { dg-do compile } */
>> -/* { dg-options "-fdump-tree-crc-details -w" } */
>> +/* { dg-options "-O2 -fdump-tree-crc-details -w" } */
>> /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-O3" "-flto" } } */
>
> No, the current consensus is moving them from gcc.dg to gcc.dg/torture.
> to fix the issue. See
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/670619.html.
Yea, I moved them yesterday.
Jeff
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details -w" } */
+/* { dg-options "-O2 -fdump-tree-crc-details -w" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-O3" "-flto" } } */
#include <stdlib.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stddef.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details -w" } */
+/* { dg-options "-O2 -fdump-tree-crc-details -w" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
/* We don't detect, it's optimized to branch-less CRC. */
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stddef.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc" } */
+/* { dg-options "-O2 -fdump-tree-crc" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-O3" "-flto" } } */
/* With -O3 the cycles is split into 2,
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdint.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdio.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdint.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdint.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdint.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdint.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdint.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdio.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
#include <stdio.h>
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-crc-details" } */
+/* { dg-options "-O2 -fdump-tree-crc-details" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Os" "-flto" } } */
typedef unsigned short ee_u16;
@@ -1,5 +1,5 @@
-/* { dg-do compile { target { riscv32*-*-* } } } */
-/* { dg-options "-march=rv32gc_zbc" } */
+/* { dg-do compile } */
+/* { dg-options "-march=rv32gc_zbc -mabi=ilp32d" } */
#include <stdint-gcc.h>
@@ -1,5 +1,5 @@
-/* { dg-do compile { target { riscv64*-*-* } } } */
-/* { dg-options "-march=rv64gc_zbc" } */
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gc_zbc -mabi=lp64d" } */
#include <stdint-gcc.h>