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

Reply via email to