Re: [PATCH] RISC-V: Enable vect test for RV32

2023-12-18 Thread Robin Dapp
Hi Juzhe,

> -} elseif [istarget riscv64-*-*] {
> +} elseif [istarget riscv*-*-*] {
>   if [check_effective_target_riscv_v] {
>   lappend DEFAULT_VECTCFLAGS "--param" "riscv-vector-abi"
>   set dg-do-what-default run

Yes, that's reasonable.  A bit further down we have

} else {
lappend DEFAULT_VECTCFLAGS "-march=rv64gcv_zvfh" "-mabi=lp64d"
lappend DEFAULT_VECTCFLAGS "--param" 
"riscv-autovec-preference=scalable"
lappend DEFAULT_VECTCFLAGS "--param" "riscv-vector-abi"

though and I wonder if we wouldn't rather want to use rv32gcv as well in the
rv32 case.

Something like the following:

@@ -11574,7 +11575,9 @@ proc check_vect_support_and_set_flags { } {
lappend DEFAULT_VECTCFLAGS "--param" "riscv-vector-abi"
set dg-do-what-default run
} else {
-   lappend DEFAULT_VECTCFLAGS "-march=rv64gcv_zvfh" "-mabi=lp64d"
-   lappend DEFAULT_VECTCFLAGS "--param" 
"riscv-autovec-preference=scalable"
+   foreach item [add_options_for_riscv_v ""] {
+   lappend DEFAULT_VECTCFLAGS $item
+   }

should do it?  We don't need to add scalable anymore I suppose.

Regards
 Robin



[PATCH] RISC-V: Enable vect test for RV32

2023-12-17 Thread Juzhe-Zhong
After recent fixes, almost all real FAILs on RV64 full coverage testing are 
fixed.

So, it's reasonable to start test RV32 vect testing now.

We will enable full coverage testing RV32 soon and to see what else need to be 
fixed.

gcc/testsuite/ChangeLog:

* lib/target-supports.exp: Enable RV32 vect testing.

---
 gcc/testsuite/lib/target-supports.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index bd38d72562d..5925457d343 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -11569,7 +11569,7 @@ proc check_vect_support_and_set_flags { } {
 }
 } elseif [istarget amdgcn-*-*] {
 set dg-do-what-default run
-} elseif [istarget riscv64-*-*] {
+} elseif [istarget riscv*-*-*] {
if [check_effective_target_riscv_v] {
lappend DEFAULT_VECTCFLAGS "--param" "riscv-vector-abi"
set dg-do-what-default run
-- 
2.36.3