* [PATCH] RISC-V: Fix dynamic lmul tests depended on abi
@ 2023-12-12 10:01 demin.han
2023-12-12 10:05 ` juzhe.zhong
2023-12-13 11:12 ` [PATCH v2] " demin.han
0 siblings, 2 replies; 7+ messages in thread
From: demin.han @ 2023-12-12 10:01 UTC (permalink / raw)
To: gcc-patches; +Cc: juzhe.zhong, pan2.li
These two tests depend on -mabi.
Other toolchain configs would report:
fatal error: gnu/stubs-ilp32.h: No such file or directory
gcc/testsuite/ChangeLog:
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c: Fix abi issue
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c: Ditto
Signed-off-by: demin.han <demin.han@starfivetech.com>
---
.../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c | 4 +++-
.../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
index 8e6610b0e11..7fd397b782e 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
+/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
+/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
+/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
#include "riscv_vector.h"
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
index b3498ad8210..5fd27cb01e1 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
+/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
+/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
+/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
#include "riscv_vector.h"
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] RISC-V: Fix dynamic lmul tests depended on abi
2023-12-12 10:01 [PATCH] RISC-V: Fix dynamic lmul tests depended on abi demin.han
@ 2023-12-12 10:05 ` juzhe.zhong
2023-12-13 8:38 ` Demin Han
2023-12-13 11:12 ` [PATCH v2] " demin.han
1 sibling, 1 reply; 7+ messages in thread
From: juzhe.zhong @ 2023-12-12 10:05 UTC (permalink / raw)
To: demin.han, gcc-patches; +Cc: pan2.li
[-- Attachment #1: Type: text/plain, Size: 2854 bytes --]
A more reasonable solution is the add riscv_vector.h into gcc.dg/vect/costmodel/riscv/rvv
with the following codes in riscv_vector.h:
/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from
C library, that might cause problem on testing RV32 related testcase when
we disable multilib. */
#ifndef _RISCV_VECTOR_WRAP_H
#define _GCC_WRAP_STDINT_H
#include "stdint-gcc.h"
#include_next <riscv_vector.h>
#define _RISCV_VECTOR_WRAP_H
#endif
juzhe.zhong@rivai.ai
From: demin.han
Date: 2023-12-12 18:01
To: gcc-patches@gcc.gnu.org
CC: juzhe.zhong@rivai.ai; pan2.li@intel.com
Subject: [PATCH] RISC-V: Fix dynamic lmul tests depended on abi
These two tests depend on -mabi.
Other toolchain configs would report:
fatal error: gnu/stubs-ilp32.h: No such file or directory
gcc/testsuite/ChangeLog:
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c: Fix abi issue
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c: Ditto
Signed-off-by: demin.han <demin.han@starfivetech.com>
---
.../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c | 4 +++-
.../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
index 8e6610b0e11..7fd397b782e 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
+/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
+/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
+/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
#include "riscv_vector.h"
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
index b3498ad8210..5fd27cb01e1 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
+/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
+/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
+/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
#include "riscv_vector.h"
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] RISC-V: Fix dynamic lmul tests depended on abi
2023-12-12 10:05 ` juzhe.zhong
@ 2023-12-13 8:38 ` Demin Han
0 siblings, 0 replies; 7+ messages in thread
From: Demin Han @ 2023-12-13 8:38 UTC (permalink / raw)
To: juzhe.zhong, gcc-patches; +Cc: pan2.li
Thanks for the suggestion.
The target selector method can not cover some cases.
On 2023/12/12 18:05, juzhe.zhong@rivai.ai wrote:
> A more reasonable solution is the add riscv_vector.h into gcc.dg/vect/costmodel/riscv/rvv
> with the following codes in riscv_vector.h:
>
> /* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from
> C library, that might cause problem on testing RV32 related testcase when
> we disable multilib. */
> #ifndef _RISCV_VECTOR_WRAP_H
>
> #define _GCC_WRAP_STDINT_H
> #include "stdint-gcc.h"
> #include_next <riscv_vector.h>
> #define _RISCV_VECTOR_WRAP_H
>
> #endif
>
>
>
> juzhe.zhong@rivai.ai
>
> From: demin.han
> Date: 2023-12-12 18:01
> To: gcc-patches@gcc.gnu.org
> CC: juzhe.zhong@rivai.ai; pan2.li@intel.com
> Subject: [PATCH] RISC-V: Fix dynamic lmul tests depended on abi
> These two tests depend on -mabi.
> Other toolchain configs would report:
> fatal error: gnu/stubs-ilp32.h: No such file or directory
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c: Fix abi issue
> * gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c: Ditto
>
> Signed-off-by: demin.han <demin.han@starfivetech.com>
> ---
> .../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c | 4 +++-
> .../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
> index 8e6610b0e11..7fd397b782e 100644
> --- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
> +++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
> @@ -1,5 +1,7 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
> +/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
> +/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
> +/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
> #include "riscv_vector.h"
> diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
> index b3498ad8210..5fd27cb01e1 100644
> --- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
> +++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
> @@ -1,5 +1,7 @@
> /* { dg-do compile } */
> -/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
> +/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
> +/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
> +/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
> #include "riscv_vector.h"
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] RISC-V: Fix dynamic lmul tests depended on abi
2023-12-12 10:01 [PATCH] RISC-V: Fix dynamic lmul tests depended on abi demin.han
2023-12-12 10:05 ` juzhe.zhong
@ 2023-12-13 11:12 ` demin.han
2023-12-13 11:16 ` juzhe.zhong
1 sibling, 1 reply; 7+ messages in thread
From: demin.han @ 2023-12-13 11:12 UTC (permalink / raw)
To: gcc-patches; +Cc: juzhe.zhong, pan2.li
Some toolchain configs would report:
fatal error: gnu/stubs-ilp32.h: No such file or directory
Fix method suggested by Juzhe-Zhong
gcc/testsuite/ChangeLog:
* gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h: New file.
Signed-off-by: demin.han <demin.han@starfivetech.com>
---
.../gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
new file mode 100644
index 00000000000..fbb4858fc86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
@@ -0,0 +1,11 @@
+/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from
+ C library, that might cause problem on testing RV32 related testcase when
+ we disable multilib. */
+#ifndef _RISCV_VECTOR_WRAP_H
+
+#define _GCC_WRAP_STDINT_H
+#include "stdint-gcc.h"
+#include_next <riscv_vector.h>
+#define _RISCV_VECTOR_WRAP_H
+
+#endif
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] RISC-V: Fix dynamic lmul tests depended on abi
2023-12-13 11:12 ` [PATCH v2] " demin.han
@ 2023-12-13 11:16 ` juzhe.zhong
2023-12-13 11:57 ` Li, Pan2
0 siblings, 1 reply; 7+ messages in thread
From: juzhe.zhong @ 2023-12-13 11:16 UTC (permalink / raw)
To: demin.han, gcc-patches; +Cc: pan2.li
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
LGTM.
juzhe.zhong@rivai.ai
From: demin.han
Date: 2023-12-13 19:12
To: gcc-patches@gcc.gnu.org
CC: juzhe.zhong@rivai.ai; pan2.li@intel.com
Subject: [PATCH v2] RISC-V: Fix dynamic lmul tests depended on abi
Some toolchain configs would report:
fatal error: gnu/stubs-ilp32.h: No such file or directory
Fix method suggested by Juzhe-Zhong
gcc/testsuite/ChangeLog:
* gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h: New file.
Signed-off-by: demin.han <demin.han@starfivetech.com>
---
.../gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
new file mode 100644
index 00000000000..fbb4858fc86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
@@ -0,0 +1,11 @@
+/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from
+ C library, that might cause problem on testing RV32 related testcase when
+ we disable multilib. */
+#ifndef _RISCV_VECTOR_WRAP_H
+
+#define _GCC_WRAP_STDINT_H
+#include "stdint-gcc.h"
+#include_next <riscv_vector.h>
+#define _RISCV_VECTOR_WRAP_H
+
+#endif
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v2] RISC-V: Fix dynamic lmul tests depended on abi
2023-12-13 11:16 ` juzhe.zhong
@ 2023-12-13 11:57 ` Li, Pan2
0 siblings, 0 replies; 7+ messages in thread
From: Li, Pan2 @ 2023-12-13 11:57 UTC (permalink / raw)
To: juzhe.zhong, demin.han, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]
Committed, thanks all.
Pan
From: juzhe.zhong@rivai.ai <juzhe.zhong@rivai.ai>
Sent: Wednesday, December 13, 2023 7:16 PM
To: demin.han <demin.han@starfivetech.com>; gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Li, Pan2 <pan2.li@intel.com>
Subject: Re: [PATCH v2] RISC-V: Fix dynamic lmul tests depended on abi
LGTM.
________________________________
juzhe.zhong@rivai.ai<mailto:juzhe.zhong@rivai.ai>
From: demin.han<mailto:demin.han@starfivetech.com>
Date: 2023-12-13 19:12
To: gcc-patches@gcc.gnu.org<mailto:gcc-patches@gcc.gnu.org>
CC: juzhe.zhong@rivai.ai<mailto:juzhe.zhong@rivai.ai>; pan2.li@intel.com<mailto:pan2.li@intel.com>
Subject: [PATCH v2] RISC-V: Fix dynamic lmul tests depended on abi
Some toolchain configs would report:
fatal error: gnu/stubs-ilp32.h: No such file or directory
Fix method suggested by Juzhe-Zhong
gcc/testsuite/ChangeLog:
* gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h: New file.
Signed-off-by: demin.han <demin.han@starfivetech.com<mailto:demin.han@starfivetech.com>>
---
.../gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
new file mode 100644
index 00000000000..fbb4858fc86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/riscv_vector.h
@@ -0,0 +1,11 @@
+/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from
+ C library, that might cause problem on testing RV32 related testcase when
+ we disable multilib. */
+#ifndef _RISCV_VECTOR_WRAP_H
+
+#define _GCC_WRAP_STDINT_H
+#include "stdint-gcc.h"
+#include_next <riscv_vector.h>
+#define _RISCV_VECTOR_WRAP_H
+
+#endif
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] RISC-V: Fix dynamic lmul tests depended on abi
@ 2023-12-13 7:25 demin.han
0 siblings, 0 replies; 7+ messages in thread
From: demin.han @ 2023-12-13 7:25 UTC (permalink / raw)
To: gcc-patches
These two tests depend on -mabi.
Other toolchain configs would report:
fatal error: gnu/stubs-ilp32.h: No such file or directory
gcc/testsuite/ChangeLog:
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c: Fix abi issue
* gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c: Ditto
Signed-off-by: demin.han <demin.han@starfivetech.com>
---
.../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c | 4 +++-
.../gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
index 8e6610b0e11..7fd397b782e 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
+/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -Wno-psabi -fdump-tree-vect-details" } */
+/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
+/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
#include "riscv_vector.h"
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
index b3498ad8210..5fd27cb01e1 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
+/* { dg-options "-O3 -ftree-vectorize --param riscv-autovec-lmul=dynamic -fdump-tree-vect-details" } */
+/* { dg-additional-options "-march=rv32gcv" { target riscv32*-*-* } } */
+/* { dg-additional-options "-march=rv64gcv" { target riscv64*-*-* } } */
#include "riscv_vector.h"
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-13 11:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-12 10:01 [PATCH] RISC-V: Fix dynamic lmul tests depended on abi demin.han
2023-12-12 10:05 ` juzhe.zhong
2023-12-13 8:38 ` Demin Han
2023-12-13 11:12 ` [PATCH v2] " demin.han
2023-12-13 11:16 ` juzhe.zhong
2023-12-13 11:57 ` Li, Pan2
2023-12-13 7:25 [PATCH] " demin.han
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).