RISC-V: Enable vect test for RV32

Message ID 20231218065256.203306-1-juzhe.zhong@rivai.ai
State Unresolved
Headers
Series RISC-V: Enable vect test for RV32 |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

juzhe.zhong@rivai.ai Dec. 18, 2023, 6:52 a.m. UTC
  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(-)
  

Comments

Robin Dapp Dec. 18, 2023, 9:08 a.m. UTC | #1
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

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